Skip to content

Commit

Permalink
fix in the dark: use pkginit with self._collection_node_cache1
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jul 22, 2020
1 parent 9aa5fc2 commit 4d017b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,8 @@ def _collect(self, argpath, names):
if isinstance(col[0], Package):
self._collection_pkg_roots[parent] = col[0]
# always store a list in the cache, matchnodes expects it
self._collection_node_cache1[col[0].fspath] = [col[0]]
assert col[0].fspath == pkginit, (col[0], col[0].fspath, pkginit)
self._collection_node_cache1[pkginit] = [col[0]]

# If it's a directory argument, recurse and look for any Subpackages.
# Let the Package collector deal with subnodes, don't collect here.
Expand Down

0 comments on commit 4d017b8

Please sign in to comment.