mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36725: regrtest: add TestResult type (GH-12960)
* Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
This commit is contained in:
parent
9db0324712
commit
4d29983185
8 changed files with 305 additions and 227 deletions
|
@ -1,5 +1,6 @@
|
|||
import os.path
|
||||
import math
|
||||
import os.path
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
|
||||
|
@ -54,3 +55,7 @@ def printlist(x, width=70, indent=4, file=None):
|
|||
print(textwrap.fill(' '.join(str(elt) for elt in sorted(x)), width,
|
||||
initial_indent=blanks, subsequent_indent=blanks),
|
||||
file=file)
|
||||
|
||||
|
||||
def print_warning(msg):
|
||||
print(f"Warning -- {msg}", file=sys.stderr, flush=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue