-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Issues counting passing rates on tests which use subTest() #34755
Comments
It turns out this is related to pytest interacting with unittest and subTest/skipTest. If running with
then |
There are couple open issues which probably worth mentioning:
|
Opening an pull request in pytest-dev/pytest-subtests#169 Might take some time to be merged (if it happens) |
Closed as pytest-dev/pytest-subtests#169 is merged |
As we discussed in #34723 (comment), we spotted that tests using
with self.subTest
along withself.skipTest()
report confusing passing rates. We need to understand how we should handle this. Below is breakdown of behavior on few syntetic tests.Note:
pytest-subtest
is installed or notpytest-subtest
into environment, see https://github.com/huggingface/accelerate/blob/c0552c9012a9bae7f125e1df89cf9ee0b0d250fd/setup.py#L25pytest-subtest
at the momentpytest-subtest
in the environment at the moment (according to below breakdown this means that if first subtest is skipped other subtests won't be executed)Synthetic tests:
ex0.py
-subTest()
without skipping:ex1.py
-subTest()
with skipping:pytest-subtests
ex0.py
pytest-subtests
ex1.py
pytest-subtests
ex0.py
pytest-subtests
ex1.py
Logs:
pytest-subtests
:CC: @ydshieh @ArthurZucker
The text was updated successfully, but these errors were encountered: