summaryrefslogtreecommitdiff
path: root/nose
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2009-05-30 13:33:27 -0400
committerJason Pellerin <jpellerin@gmail.com>2009-05-30 13:33:27 -0400
commit8e64d436922a0c68f9fd2895fea9a1753a9e9090 (patch)
treee4e1fbc1f0287f405e7a8d07b4aa13a70a20c5a2 /nose
parent92b050010fb7bc8b8b774b4df559aec912d95678 (diff)
downloadnose-8e64d436922a0c68f9fd2895fea9a1753a9e9090.tar.gz
Fixed issue 270: packages dispatched to mp worker were not fully loaded
Diffstat (limited to 'nose')
-rw-r--r--nose/loader.py3
-rw-r--r--nose/plugins/multiprocess.py5
2 files changed, 8 insertions, 0 deletions
diff --git a/nose/loader.py b/nose/loader.py
index aa1159b..969aac2 100644
--- a/nose/loader.py
+++ b/nose/loader.py
@@ -311,6 +311,9 @@ class TestLoader(unittest.TestLoader):
if path:
path = os.path.realpath(path)
for module_path in module_paths:
+ log.debug("Load tests from module path %s?", module_path)
+ log.debug("path: %s os.path.realpath(%s): %s",
+ path, module_path, os.path.realpath(module_path))
if (self.config.traverseNamespace or not path) or \
os.path.realpath(module_path).startswith(path):
tests.extend(self.loadTestsFromDir(module_path))
diff --git a/nose/plugins/multiprocess.py b/nose/plugins/multiprocess.py
index c3883b3..e81565b 100644
--- a/nose/plugins/multiprocess.py
+++ b/nose/plugins/multiprocess.py
@@ -365,6 +365,11 @@ class MultiProcessTestRunner(TextTestRunner):
else:
parts.append(mod)
else:
+ # strip __init__.py(c) from end of file part
+ # if present, having it there confuses loader
+ dirname, basename = os.path.split(file)
+ if basename.startswith('__init__'):
+ file = dirname
parts.append(file)
if call is not None:
parts.append(call)