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
{{ message }}
Repository navigation
unittest.TestResult.testsRun no longer counts skipped tests. #110890
unittest.TestResult.testsRun no longer counts skipped tests in Python 3.13.0a1. I couldn't not find anything in the release notes, so maybe it's not an intended change 🤔 If it was changed on purpose I can adjust our test. Thanks!
changed the title [-]TestResult.testsRun no longer counts skipped tests.[/-][+]unittest.TestResult.testsRun no longer counts skipped tests.[/+]on Oct 15, 2023
Intentional change viewed as a bugfix. In the 3.13 changelog changelog: gh-106584: Fix exit code for unittest if all tests are skipped.
The corresponding PR 106588 starts "Increase the number of running tests only if a test hasn't been skipped." This was merged into 3.13 a week before 3.12.0 was released and the backport was deferred until after that release to appear in 3.12.1. In the diff, the call to result.startTest, which increments testsRun, is moved below the skip return with comment "# Increase the number of tests only if it hasn't been skipped".
Intentional change viewed as a bugfix. In the 3.13 changelog changelog: gh-106584: Fix exit code for unittest if all tests are skipped. The corresponding PR 106588 starts "Increase the number of running tests only if a test hasn't been skipped." This was merged into 3.13 a week before 3.12.0 was released and the backport was deferred until after that release to appear in 3.12.1. In the diff, the call to result.startTest, which increments testsRun, is moved below the skip return with comment "# Increase the number of tests only if it hasn't been skipped".
@terryjreedy Many thanks for the detailed explanation 🌟
Activity
AlexWaygood commentedon Oct 15, 2023
felixxm commentedon Oct 15, 2023
[-]TestResult.testsRun no longer counts skipped tests.[/-][+]unittest.TestResult.testsRun no longer counts skipped tests.[/+]terryjreedy commentedon Oct 15, 2023
Intentional change viewed as a bugfix. In the 3.13 changelog changelog:
gh-106584: Fix exit code for unittest if all tests are skipped.
The corresponding PR 106588 starts "Increase the number of running tests only if a test hasn't been skipped." This was merged into 3.13 a week before 3.12.0 was released and the backport was deferred until after that release to appear in 3.12.1. In the diff, the call to result.startTest, which increments
testsRun, is moved below the skip return with comment "# Increase the number of tests only if it hasn't been skipped".felixxm commentedon Oct 15, 2023
@terryjreedy Many thanks for the detailed explanation 🌟