summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2015-06-01 06:53:34 -0400
committerJohn Szakmeister <john@szakmeister.net>2015-06-01 06:53:34 -0400
commit9d8bfcd6693a7969224f0b87854572d9995a7776 (patch)
tree35cf5807b9bdbdc3ea1f437cdc00d58eebcc8064
parent8c75d1d4369228b4fb4b48eba3b46c39f7076dca (diff)
parentbd195e3d5c2a4787a4cc350abcc7bdaf52d67ed2 (diff)
downloadnose-9d8bfcd6693a7969224f0b87854572d9995a7776.tar.gz
Merge pull request #916 from takluyver:i902.
Fix loading packages from capitalised package on Windows.
-rw-r--r--nose/loader.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/nose/loader.py b/nose/loader.py
index efe1b10..3744e54 100644
--- a/nose/loader.py
+++ b/nose/loader.py
@@ -341,15 +341,13 @@ class TestLoader(unittest.TestLoader):
path = os.path.normcase(os.path.realpath(path))
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))
+ path, os.path.normcase(module_path),
+ os.path.realpath(os.path.normcase(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):