-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
not collect deselected tests #239
Comments
Original comment by Alex Okrushko (BitBucket: alex_okrushko, GitHub: alex_okrushko): forgot to log in first |
One thing I am worried about is that you maybe can't know until the test has been collected. This would be unsafe for sure with -k, maybe with -m it is safer. But for example a fixture can dynamically add a marker. So you'd want to have that happen before selecting tests. |
Sounds like we still can do a best effort |
True, we could do it twice. |
as far as i can tell, we can make collectors bail out early, we'd still have to report the bailout in some way and figure how to do report collector deselection its def not a easy or short term task |
Closing, the issue should be tackled with better collection |
Originally reported by: Anonymous
Some tests can be generating multiple tests through
@pytest.mark.parametrize()
ormetafunc.parametrize
, however if those tests are marked and specified not to run (through-m "not marker"
command line argument) they are still collected first and then are deselected.In my specific case, one of
@pytest.mark.parametrize()
is generating around 500 tests - only to be deselected afterwards. This makes a long test even longer.Suggestion: to add an option not to generate (or not to collect) tests that are not required.
Thanks!
The text was updated successfully, but these errors were encountered: