Repository navigation
Test suite skips failing tests when setUp[Class] fails #90681
Copy link
Copy link
Closed
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
Here's what happened. We had an error in
test_typing.py, which was silently ignored.====================================================================== ERROR: setUpClass (test.test_typing.NewTypeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\a\cpython\cpython\lib\test\test_typing.py", line 3917, in setUpClass UserId = NewType('UserId', int) NameError: name 'NewType' is not defined ---------------------------------------------------------------------- Ran 396 tests in 0.085s FAILED (errors=1, skipped=1) test test_typing failedLink: https://github.com/python/cpython/runs/4902363883?check_suite_focus=true
But, later the suite runner tried to rerun it:
0:09:12 load avg: 6.37 Re-running failed tests in verbose mode 0:09:12 load avg: 6.37 Re-running test_typing in verbose mode (matching: setUpClass) 1 re-run test: test_typing 1 test run no tests: test_typingAnd since nothing matched
setUpClass- no tests were executed and the CI went green instead of red.What can we do?
- Only schedule real
test_item to be rerun, fail for everything else - Convert
setupClassfailure into the whole class rerun - Other options?
I would like to work on this, when we will decide which way is best.
- Only schedule real
- added3.9 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jan 25, 2022 I vote for option 2.
- changed the title
[-]Test suite skips failing tests[/-][+]Test suite skips failing tests when setUp[Class] fails[/+]on Jan 25, 2022 - changed the title
[-]Test suite skips failing tests[/-][+]Test suite skips failing tests when setUp[Class] fails[/+]on Jan 25, 2022 @sobolevn The issue seems to have been solved. We can close the issue.
Metadata
Metadata
Assignees
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
setUp[Class|Module]fails #30895Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: