mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-62432: unittest runner: Exit code 5 if no tests were run (#102051)
As discussed in https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498/7 It is common for test runner misconfiguration to fail to find any tests, This should be an error. Fixes: #62432
This commit is contained in:
parent
dc3f97549a
commit
76632b836c
8 changed files with 64 additions and 22 deletions
|
@ -2281,7 +2281,8 @@ Loading and running tests
|
|||
|
||||
The *testRunner* argument can either be a test runner class or an already
|
||||
created instance of it. By default ``main`` calls :func:`sys.exit` with
|
||||
an exit code indicating success or failure of the tests run.
|
||||
an exit code indicating success (0) or failure (1) of the tests run.
|
||||
An exit code of 5 indicates that no tests were run.
|
||||
|
||||
The *testLoader* argument has to be a :class:`TestLoader` instance,
|
||||
and defaults to :data:`defaultTestLoader`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue