summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2014-09-29 16:27:12 -0400
committerJohn Szakmeister <john@szakmeister.net>2014-10-24 16:47:30 -0400
commit347352af79dfced2827266986a22c0259e1a8012 (patch)
tree2950e3d32ea7c283b9cf78280e7880ee9875ad19
parent889d41f3374f65ad6934dc0a636104e9ec11a502 (diff)
downloadnose-347352af79dfced2827266986a22c0259e1a8012.tar.gz
Fix #809: Tests not discovered for namespace packages on Windows
-rw-r--r--nose/loader.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/nose/loader.py b/nose/loader.py
index 966b6dc..2e6b919 100644
--- a/nose/loader.py
+++ b/nose/loader.py
@@ -336,9 +336,15 @@ class TestLoader(unittest.TestLoader):
# FIXME can or should this be lazy?
# is this syntax 2.2 compatible?
module_paths = getattr(module, '__path__', [])
+
if path:
- path = os.path.realpath(path)
+ 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))