GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.12] regrtest computes statistics (GH-108793) by miss-islington · Pull Request #108818 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 2, 2023

Copy link
Copy Markdown
Contributor

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.

(cherry picked from commit d4e534c)

Co-authored-by: Victor Stinner [email protected]
Co-authored-by: Alex Waygood [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner @AlexWaygood @miss-islington
regrtest computes statistics (pythonGH-108793)
38f6320
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.

(cherry picked from commit d4e534c)

Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
@bedevere-bot bedevere-bot added the skip issue label Sep 2, 2023
@bedevere-bot bedevere-bot mentioned this pull request Sep 2, 2023
regrtest computes statistics #108793
Merged
@bedevere-bot bedevere-bot added skip news awaiting review labels Sep 2, 2023
vstinner
vstinner approved these changes Sep 2, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

It can wait for Python 3.12.1.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner

vstinner commented Sep 2, 2023

Copy link
Copy Markdown
Member

In general, I'm trying to keep libregrtest the same in all stable branches. It seems like 3.11 has an outdated libregrtest :-(

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 2, 2023

Copy link
Copy Markdown
Member

In general, I'm trying to keep libregrtest the same in all stable branches. It seems like 3.11 has an outdated libregrtest :-(

I backported the statistics change to Python 3.11: #108820

I would prefer to have the same code in 3.11, 3.12 and main branches to ease future backports.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Yhg1s
Merge branch '3.12' into backport-d4e534c-3.12
be1bfa4
@Yhg1s

Yhg1s commented Sep 2, 2023

Copy link
Copy Markdown
Member

Can you take a look at the test failures?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 2, 2023

Copy link
Copy Markdown
Member

Can you take a look at the test failures?

Oh. I missed the fact that the final changes uses the doctest.TestResults.skipped attribute which I just added to Python 3.13.

I close this broken backport PR and backported the change manually to Python 3.12 to adapt it to Python 3.12 API: PR #108833.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this Sep 2, 2023
@miss-islington
miss-islington deleted the backport-d4e534c-3.12 branch September 2, 2023 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@miss-islington @vstinner @Yhg1s @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.