Commit 3a969ed1 authored by Jim Fulton's avatar Jim Fulton

Allow "tests" modules to be ordinary modules, rather than packages.

parent c8423574
......@@ -391,6 +391,12 @@ class TestFileFinder:
def visit(self, rx, dir, files):
if os.path.split(dir)[1] != self.dirname:
# Allow tests module rather than package.
if "tests.py" in files:
path = os.path.join(dir, "tests.py")
if match(rx, path):
self.files.append(path)
return
return
if not self.is_package(dir):
return
......
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