From: Victor Stinner Date: Tue, 6 Jan 2015 13:05:03 +0000 (+0100) Subject: Issue #23145: regrtest now shows errors and raises an exception if X-Git-Tag: v3.5.0a1~233 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d575399bca935fec36d6a1ba538115406673415;p=python Issue #23145: regrtest now shows errors and raises an exception if loader.loadTestsFromModule() logged errors. --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index b633631b00..ea1287ddde 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: