mirror of
https://github.com/python/cpython.git
synced 2026-01-10 09:22:36 +00:00
gh-108822: regrtest computes statistics (#108793)
test_netrc, test_pep646_syntax and test_xml_etree now return results
in the test_main() function.
Changes:
* Rewrite TestResult as a dataclass with a new State class.
* Add test.support.TestStats class and Regrtest.stats_dict attribute.
* libregrtest.runtest functions now modify a TestResult instance
in-place.
* libregrtest summary lists the number of run tests and skipped
tests, and denied resources.
* Add TestResult.has_meaningful_duration() method.
* Compute TestResult duration in the upper function.
* Use time.perf_counter() instead of time.monotonic().
* Regrtest: rename 'resource_denieds' attribute to 'resource_denied'.
* Rename CHILD_ERROR to MULTIPROCESSING_ERROR.
* Use match/case syntadx to have different code depending on the
test state.
Notes on the backport: doctest.TestResults.skipped is a new feature
in Python 3.13, so don't use it in the backport.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| _hypothesis_stubs | ||
| __init__.py | ||
| ast_helper.py | ||
| asynchat.py | ||
| asyncore.py | ||
| bytecode_helper.py | ||
| hashlib_helper.py | ||
| hypothesis_helper.py | ||
| import_helper.py | ||
| interpreters.py | ||
| logging_helper.py | ||
| os_helper.py | ||
| script_helper.py | ||
| socket_helper.py | ||
| testcase.py | ||
| testresult.py | ||
| threading_helper.py | ||
| warnings_helper.py | ||