diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-06 13:05:03 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-06 13:05:03 (GMT) |
commit | 5d575399bca935fec36d6a1ba538115406673415 (patch) | |
tree | a05c361bee94078e2c4f59e61abca3fe170e8d6e | |
parent | 4da9f32ac10867a0872feb312ae081cab225e471 (diff) | |
download | cpython-5d575399bca935fec36d6a1ba538115406673415.zip cpython-5d575399bca935fec36d6a1ba538115406673415.tar.gz cpython-5d575399bca935fec36d6a1ba538115406673415.tar.bz2 |
Issue #23145: regrtest now shows errors and raises an exception if
loader.loadTestsFromModule() logged errors.
-rwxr-xr-x | Lib/test/regrtest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index b633631..ea1287d 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1276,6 +1276,10 @@ def runtest_inner(test, verbose, quiet, def test_runner(): loader = unittest.TestLoader() tests = loader.loadTestsFromModule(the_module) + for error in loader.errors: + print(error, file=sys.stderr) + if loader.errors: + raise Exception("errors while loading tests") support.run_unittest(tests) test_runner() if huntrleaks: |