You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that when running pytest -x (i.e. stop after the first failure) on a test with failing subtests, the entire test will run - the test won't abort after the first failing subtest. For example, with a test like this:
I've been using pytest-subtests quite extensively with the reference implementation for PEP 615, and some tests have dozens of subtests (e.g. this one, where the subtest is basically used for parametrization), and I'd like to be able to quickly stop the tests and get short feedback if something is broken, but instead I get dozens of failure messages.
I assume there's a related but possibly trickier question of when you set --max-failures to some number other than 1, are you counting subtests or are you counting top-level tests, but I only ever use -x to mean "stop immediately on first failure", and this is defeating my intuitions on that use case.
The text was updated successfully, but these errors were encountered:
Same issue here, it makes it quite hard to iterate on a single large test having many small subtests (most of my subtests are just a single assert line)
I have noticed that when running
pytest -x
(i.e. stop after the first failure) on a test with failing subtests, the entire test will run - the test won't abort after the first failing subtest. For example, with a test like this:The short test summary for
pytest -x
shows 9 failures instead of 1:I've been using
pytest-subtests
quite extensively with the reference implementation for PEP 615, and some tests have dozens of subtests (e.g. this one, where the subtest is basically used for parametrization), and I'd like to be able to quickly stop the tests and get short feedback if something is broken, but instead I get dozens of failure messages.I assume there's a related but possibly trickier question of when you set
--max-failures
to some number other than 1, are you counting subtests or are you counting top-level tests, but I only ever use-x
to mean "stop immediately on first failure", and this is defeating my intuitions on that use case.The text was updated successfully, but these errors were encountered: