summaryrefslogtreecommitdiff
path: root/nose/loader.py
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2015-10-21 04:11:49 -0400
committerJohn Szakmeister <john@szakmeister.net>2015-10-21 04:11:49 -0400
commit6d2b14634775778e95df1c057b404108b9db036a (patch)
tree4964851c4037b59757ebe67bbe552875236790d9 /nose/loader.py
parentd6642085a87cece41edc3808749f68d7b9a5ecd9 (diff)
parent9ccf568e7f7a8c48d235e779f2add2481859d81c (diff)
downloadnose-6d2b14634775778e95df1c057b404108b9db036a.tar.gz
Merge pull request #957 from jszakmeister/fix-931
Fix #931: duplicate __init__ modules can be picked up
Diffstat (limited to 'nose/loader.py')
-rw-r--r--nose/loader.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nose/loader.py b/nose/loader.py
index 3744e54..a579372 100644
--- a/nose/loader.py
+++ b/nose/loader.py
@@ -21,7 +21,7 @@ from nose.config import Config
from nose.importer import Importer, add_path, remove_path
from nose.selector import defaultSelector, TestAddress
from nose.util import func_lineno, getpackage, isclass, isgenerator, \
- ispackage, regex_last_key, resolve_name, transplant_func, \
+ ispackage, regex_last_key, resolve_name, src, transplant_func, \
transplant_class, test_address
from nose.suite import ContextSuiteFactory, ContextList, LazySuite
from nose.pyversion import sort_list, cmp_to_key
@@ -153,6 +153,8 @@ class TestLoader(unittest.TestLoader):
# http://code.google.com/p/python-nose/issues/detail?id=82
if entry.startswith('.'):
continue
+ if src(entry) == '__init__.py':
+ continue
entry_path = op_abspath(op_join(path, entry))
is_file = op_isfile(entry_path)
wanted = False