diff options
author | Thomas Kluyver <takowl@gmail.com> | 2015-05-31 10:19:09 -0700 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2015-05-31 10:19:09 -0700 |
commit | e389b61387d45a1e465dce8eacb4c93877247cc6 (patch) | |
tree | 69112cc2f57a123fdda39c38435c98ede23e96cc | |
parent | f349692bd42edb04252d740c1d401079142eb24b (diff) | |
download | nose-e389b61387d45a1e465dce8eacb4c93877247cc6.tar.gz |
Fix loading packages from capitalised package on Windows
Closes gh-902
-rw-r--r-- | nose/loader.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nose/loader.py b/nose/loader.py index efe1b10..750b23d 100644 --- a/nose/loader.py +++ b/nose/loader.py @@ -343,13 +343,13 @@ class TestLoader(unittest.TestLoader): for module_path in module_paths: log.debug('os.path.normcase(%r): %r', module_path, os.path.normcase(module_path)) - module_path = os.path.normcase(module_path) 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): + os.path.realpath(os.path.normcase(module_path))\ + .startswith(path): # Egg files can be on sys.path, so make sure the path is a # directory before trying to load from it. if os.path.isdir(module_path): |