mirror of
https://github.com/python/cpython.git
synced 2025-08-15 14:20:55 +00:00
[3.12] GH-113661: unittest runner: Don't exit 5 if tests were skipped (GH-113856) (#113875)
GH-113661: unittest runner: Don't exit 5 if tests were skipped (GH-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.
(cherry picked from commit 3a9096c337
)
Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
This commit is contained in:
parent
85cf360d29
commit
159e3db1f7
5 changed files with 18 additions and 3 deletions
|
@ -274,7 +274,7 @@ class TextTestRunner(object):
|
|||
infos.append("failures=%d" % failed)
|
||||
if errored:
|
||||
infos.append("errors=%d" % errored)
|
||||
elif run == 0:
|
||||
elif run == 0 and not skipped:
|
||||
self.stream.write("NO TESTS RAN")
|
||||
else:
|
||||
self.stream.write("OK")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue