summaryrefslogtreecommitdiff
path: root/nose
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2013-08-30 11:02:14 -0700
committerPhilip Jenvey <pjenvey@underboss.org>2013-08-30 11:02:14 -0700
commitca46f8fcb2be895b06f0f2935bd4e8e8deb37e88 (patch)
tree092562a7a63e30307a60e7cf17e4f8d385c33ac8 /nose
parent7ce321f8cd98318edb889f1dc8ce7e3ab9a8c8a2 (diff)
parent07677088453fec3ef8031000f991ab16fade4095 (diff)
downloadnose-ca46f8fcb2be895b06f0f2935bd4e8e8deb37e88.tar.gz
Merge pull request #719 from pib/init_prefix_bug
Fix Importer.importFromPath to be able to import modules whose names start with __init__
Diffstat (limited to 'nose')
-rw-r--r--nose/importer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nose/importer.py b/nose/importer.py
index d7d9120..e677658 100644
--- a/nose/importer.py
+++ b/nose/importer.py
@@ -39,7 +39,7 @@ class Importer(object):
# find the base dir of the package
path_parts = os.path.normpath(os.path.abspath(path)).split(os.sep)
name_parts = fqname.split('.')
- if path_parts[-1].startswith('__init__'):
+ if path_parts[-1] == '__init__.py':
path_parts.pop()
path_parts = path_parts[:-(len(name_parts))]
dir_path = os.sep.join(path_parts)