cpython/Lib/test/libregrtest
Victor Stinner d4e534cbb3
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.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-02 18:09:36 +02:00
..
__init__.py bpo-37473: Don't import importlib ASAP in tests (GH-14661) 2019-07-14 19:31:12 +02:00
cmdline.py gh-94052: Don't re-run failed tests with --python option (#94054) 2022-06-21 14:42:32 +02:00
main.py regrtest computes statistics (#108793) 2023-09-02 18:09:36 +02:00
pgo.py bpo-10572: Fixup Lib/test/libregrtest/pgo.py (GH-29327) 2021-11-01 09:57:28 +00:00
refleak.py regrtest computes statistics (#108793) 2023-09-02 18:09:36 +02:00
runtest.py regrtest computes statistics (#108793) 2023-09-02 18:09:36 +02:00
runtest_mp.py regrtest computes statistics (#108793) 2023-09-02 18:09:36 +02:00
save_env.py regrtest computes statistics (#108793) 2023-09-02 18:09:36 +02:00
setup.py Run Tools/scripts/reindent.py (#94225) 2022-06-26 10:34:06 +02:00
utils.py gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238) 2023-08-21 22:16:23 +02:00
win_utils.py bpo-44336: Prevent tests hanging on child process handles on Windows (GH-26578) 2022-03-22 00:06:55 +00:00