Merge pull request #11957 from bluetech/fix-session-collect-order

main: fix reversed collection order in Session
This commit is contained in:
Ran Benita
2024-02-13 09:44:13 +02:00
committed by GitHub
4 changed files with 22 additions and 4 deletions

View File

@@ -897,7 +897,7 @@ class Session(nodes.Collector):
# Prune this level.
any_matched_in_collector = False
for node in subnodes:
for node in reversed(subnodes):
# Path part e.g. `/a/b/` in `/a/b/test_file.py::TestIt::test_it`.
if isinstance(matchparts[0], Path):
is_match = node.path == matchparts[0]