We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ab3d81 commit a6ff5e6Copy full SHA for a6ff5e6
src/_pytest/main.py
@@ -386,6 +386,7 @@ def __init__(self, config):
386
self._initialpaths = frozenset()
387
# Keep track of any collected nodes in here, so we don't duplicate fixtures
388
self._node_cache = {}
389
+ # Dirnames of pkgs with dunder-init files.
390
self._pkg_roots = {}
391
392
self.config.pluginmanager.register(self, name="session")
@@ -535,8 +536,7 @@ def filter_(f):
535
536
seen_dirs.add(dirpath)
537
pkginit = dirpath.join("__init__.py")
538
if pkginit.exists():
- collect_root = self._pkg_roots.get(dirpath, self)
539
- for x in collect_root._collectfile(pkginit):
+ for x in self._collectfile(pkginit):
540
yield x
541
if isinstance(x, Package):
542
self._pkg_roots[dirpath] = x
0 commit comments