[3.12] gh-108822: regrtest computes statistics (#108793)#108833
Merged
Yhg1s merged 1 commit intopython:3.12from Sep 4, 2023
Merged
[3.12] gh-108822: regrtest computes statistics (#108793)#108833Yhg1s merged 1 commit intopython:3.12from
Yhg1s merged 1 commit intopython:3.12from
Conversation
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 d4e534c)
Member
Author
|
Notes on the backport: doctest.TestResults.skipped is a new feature in Python 3.13, so don't use it in the backport. |
Member
Author
|
In general, I'm trying to keep libregrtest the same in all stable branches. Python 3.11 has an outdated libregrtest. I wrote to backport regrtest changes of last months to Python 3.11: #108820 I just merged my PR. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_netrc, test_pep646_syntax and test_xml_etree now return results in the test_main() function.
Changes:
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 d4e534c)