mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
GH-113661: unittest runner: Don't exit 5 if tests were skipped (#113856)
The intention of exiting 5 was to detect issues where the test suite wasn't discovered at all. If we skipped tests, it was correctly discovered.
This commit is contained in:
parent
0297418cac
commit
3a9096c337
5 changed files with 18 additions and 3 deletions
|
|
@ -269,7 +269,7 @@ class TestProgram(object):
|
|||
testRunner = self.testRunner
|
||||
self.result = testRunner.run(self.test)
|
||||
if self.exit:
|
||||
if self.result.testsRun == 0:
|
||||
if self.result.testsRun == 0 and len(self.result.skipped) == 0:
|
||||
sys.exit(_NO_TESTS_EXITCODE)
|
||||
elif self.result.wasSuccessful():
|
||||
sys.exit(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue