From 5d575399bca935fec36d6a1ba538115406673415 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Jan 2015 14:05:03 +0100 Subject: Issue #23145: regrtest now shows errors and raises an exception if loader.loadTestsFromModule() logged errors. --- Lib/test/regrtest.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- cgit v0.12