-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
session.testscollected misnomer #9614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @schettino72, technically
Do you have a use case for |
I can not follow you...
I guess that was the exact defintion of "selected items". 😁 Output from command line usually looks like:
On terminal.py there is a line:
But I guess that is a bug as well, because the errors here refer to "collect" errors, and when there is an error on collection that are zero tests collected. There is even a guard against selected being negative (what should have been a clear indication that the computation logic is wrong).
I found this bug while working on: numirias/pytest-json-report#74 |
I changed tag to BUG: if I have a single test module with 4 tests the output is:
But if introduce a test module that causes an error on collection I get:
It should be |
I created a separate issue #9626 to handle the problem with count on terminal output. |
pytest version: 7.0.0
In hookspec.py
But this variable actually contains the number of SELECTED tests.
The value is set at after
pytest_collection_modifyitems
, where items might be deselected.To avoid breaking existing code I would suggest just deprecating this variable and adding:
The text was updated successfully, but these errors were encountered: