How to report number of collected tests correctly after filter via pytest_collection_modifyitems #8286
-
I'm developing a plugin to balance the execution of long suite among several instances that runs only a subset of the items. I was able to "filter" the tests, but the report is done before I mutate the items list, so it shows the original number of collected tests. Suppose this
When I implement something like this def pytest_collection_modifyitems(config, items):
items[:] = items[:len(items)//2] I got
How can I report correctly that "2 tests were collected" ? |
Beta Was this translation helpful? Give feedback.
Answered by
RonnyPfannschmidt
Jan 27, 2021
Replies: 1 comment 2 replies
-
The pytest_deselected hook has to be invoked atm |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mgaitan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The pytest_deselected hook has to be invoked atm