-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetype: regressionindicates a problem that was introduced in a release which was working previouslyindicates a problem that was introduced in a release which was working previously
Description
Hi, in work I have been recently upgrading from pytest 5.4.3 -> 6.1.2, I observe a behaviour discrepency in the:
pytest_collection_modifyitems hook, in 5.4.3 given our setup we get the following:
pytest --last-failed --last-failed-no-failures none # internal plugin registered via pytest_plugins=[]
@pytest.hookimpl(trylast=True)
def pytest_collection_modifyitems(self, items: List[Item]) -> None:
try:
for item in items:
log.debug(f"collected item: {item.name}")
do_something()
except Exception as exc:
pytest.exit(str(exc))In the above snippet, the import thing is len(items) is 2. inline with this:
{
"scrubbed/sensitive/info/test_two.py::TestTwo::test_two": true
"scrubbed/sensitive/info/test_one.py::TestOne::test_one": true
}
I upgraded to 6.1.2 and with the same last failed cache highlighted above, len of the items in my hook implementation above is now pretty much every single test we have, 2600+.
note: This is barebones at the moment, scrubbing sensitive info is going to take a while
Metadata
Metadata
Assignees
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetype: regressionindicates a problem that was introduced in a release which was working previouslyindicates a problem that was introduced in a release which was working previously