ignore test directories in top-level __init__ imports
This commit is contained in:
parent
84a845185e
commit
662af1a9c5
|
@ -139,7 +139,7 @@ def importModules(path, globals, locals, excludes=()):
|
||||||
d = os.path.join(os.path.split(globals['__file__'])[0], path)
|
d = os.path.join(os.path.split(globals['__file__'])[0], path)
|
||||||
files = set()
|
files = set()
|
||||||
for f in frozenSupport.listdir(d):
|
for f in frozenSupport.listdir(d):
|
||||||
if frozenSupport.isdir(os.path.join(d, f)) and f != '__pycache__':
|
if frozenSupport.isdir(os.path.join(d, f)) and f not in ['__pycache__', 'tests']:
|
||||||
files.add(f)
|
files.add(f)
|
||||||
elif f[-3:] == '.py' and f != '__init__.py':
|
elif f[-3:] == '.py' and f != '__init__.py':
|
||||||
files.add(f[:-3])
|
files.add(f[:-3])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user