Commit 662af1a9 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

ignore test directories in top-level __init__ imports

parent 84a84518
...@@ -139,7 +139,7 @@ def importModules(path, globals, locals, excludes=()): ...@@ -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])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment