When the Python test suite is run with a typo in a test filename or a test method, it displays "NO TEST RUN" but the exit code is a success (exit code 0) and so the mistake can be easily missed. I propose to make the test suite fail with a non-zero exit code to highlight that something unusual happened.
The Python test suite now fails wit exit code 4 if no tests ran. It
should help detecting typos in test names and test methods.
* Add "EXITCODE_" constants to Lib/test/libregrtest/main.py.
* Fix a typo: "NO TEST RUN" becomes "NO TESTS RAN"
The Python test suite now fails wit exit code 4 if no tests ran. It
should help detecting typos in test names and test methods.
* Add "EXITCODE_" constants to Lib/test/libregrtest/main.py.
* Fix a typo: "NO TEST RUN" becomes "NO TESTS RAN"
vstinner commentedOct 31, 2022
•
edited by bedevere-bot
When the Python test suite is run with a typo in a test filename or a test method, it displays "NO TEST RUN" but the exit code is a success (exit code 0) and so the mistake can be easily missed. I propose to make the test suite fail with a non-zero exit code to highlight that something unusual happened.
The text was updated successfully, but these errors were encountered: