mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #23145: regrtest now shows errors and raises an exception if
loader.loadTestsFromModule() logged errors.
This commit is contained in:
parent
4da9f32ac1
commit
5d575399bc
1 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue