summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/runner.py
diff options
context:
space:
mode:
authorStefano Rivera <stefano@rivera.za.net>2024-01-09 19:50:01 (GMT)
committerGitHub <noreply@github.com>2024-01-09 19:50:01 (GMT)
commit3a9096c337c16c9335e0d4eba8d1d4196258af72 (patch)
treeb8c47dbf94a29a8ca02dc5219197b196918be441 /Lib/unittest/runner.py
parent0297418cacf998e778bc0517aa11eaac827b8c0f (diff)
downloadcpython-3a9096c337c16c9335e0d4eba8d1d4196258af72.zip
cpython-3a9096c337c16c9335e0d4eba8d1d4196258af72.tar.gz
cpython-3a9096c337c16c9335e0d4eba8d1d4196258af72.tar.bz2
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.
Diffstat (limited to 'Lib/unittest/runner.py')
-rw-r--r--Lib/unittest/runner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/runner.py b/Lib/unittest/runner.py
index e3c020e..2bcadf0 100644
--- a/Lib/unittest/runner.py
+++ b/Lib/unittest/runner.py
@@ -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")