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 — gh-89392: Make test_decimal discoverable by serhiy-storchaka · Pull Request #106209 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 28, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

It is very peculiar test file. It provides additional CLI interface and programming interface which accept options to control what to test what print during testing.

This PR is different from Zachary's patch for #64207. It only makes minimal changes necessary to make tests discoverable, use standard unittest methods to collect and run tests, and avoid changing the current behavior. The code of the module can be improved further, but this is out of the scope of this PR.

The two modified tests depended on the order in which the tests were ran.

  • Issue: Always use unittest for collecting tests in regrtests #89392

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jun 28, 2023
@serhiy-storchaka
serhiy-storchaka requested a review from zware June 28, 2023 17:06
@serhiy-storchaka
serhiy-storchaka requested a review from rhettinger as a code owner June 28, 2023 17:06
@bedevere-bot bedevere-bot added the awaiting core review label Jun 28, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jun 28, 2023
Always use unittest for collecting tests in regrtests #89392
Closed
@serhiy-storchaka
serhiy-storchaka force-pushed the test_decimal branch 2 times, most recently from 6dbb8a5 to 9e7f09a Compare June 28, 2023 17:14
zware
zware approved these changes Jun 28, 2023
View reviewed changes

@zware zware 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. As you said, there's more cleanup to be done here, but splitting out just the discoverability fixes makes a lot of sense; I tried to do too much in my old attempt :)

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jun 28, 2023
@serhiy-storchaka
serhiy-storchaka force-pushed the test_decimal branch from 9e7f09a to 9b8c95e Compare June 28, 2023 17:24
@zware zware mentioned this pull request Jun 28, 2023
Clean up/refactor/make discoverable test_decimal #64207
Closed
@serhiy-storchaka
serhiy-storchaka force-pushed the test_decimal branch from 9b8c95e to 196fc8a Compare June 29, 2023 06:47
@serhiy-storchaka
pythongh-89392: Make test_decimal discoverable
ce3f424
@serhiy-storchaka
serhiy-storchaka force-pushed the test_decimal branch from 196fc8a to ce3f424 Compare June 29, 2023 07:54
@erlend-aasland erlend-aasland mentioned this pull request Jun 29, 2023
gh-106078: Convert _decimal types to heap types #106079
Merged
erlend-aasland
erlend-aasland approved these changes Jun 29, 2023
View reviewed changes

@erlend-aasland erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

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.

This is a very nice cleanup; thanks, Serhiy!

python -m test test_decimal -m "<regex>" -v now finally behaves as expected.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/test_decimal.py Resolved

Uh oh!

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

@serhiy-storchaka
serhiy-storchaka merged commit 0e24499 into python:main Jun 29, 2023
@miss-islington

miss-islington commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label Jun 29, 2023
@miss-islington

miss-islington commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

Sorry @serhiy-storchaka, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 0e24499129f3917b199a6d46fa33eeedd2c447fc 3.12

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka
serhiy-storchaka deleted the test_decimal branch June 29, 2023 09:53
@miss-islington miss-islington assigned serhiy-storchaka Jun 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 29, 2023
@serhiy-storchaka @miss-islington
pythongh-89392: Make test_decimal discoverable (pythonGH-106209)
1f7fe73
(cherry picked from commit 0e24499)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 29, 2023

Copy link
Copy Markdown

GH-106229 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 29, 2023
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.12 only security fixes label Jun 29, 2023
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.12 only security fixes label Jun 29, 2023
@miss-islington

miss-islington commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 29, 2023
@serhiy-storchaka @miss-islington
pythongh-89392: Make test_decimal discoverable (pythonGH-106209)
132a20b
(cherry picked from commit 0e24499)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 29, 2023

Copy link
Copy Markdown

GH-106230 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jun 29, 2023
@zware

zware commented Jun 29, 2023

Copy link
Copy Markdown
Member

Only took 10 years, but we got there! Thanks Serhiy :)

serhiy-storchaka and erlend-aasland reacted with hooray emoji
All reactions
  • 🎉 2 reactions

Sorry, something went wrong.

Uh oh!

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

ambv pushed a commit that referenced this pull request Jul 5, 2023
@miss-islington @serhiy-storchaka
[3.12] gh-89392: Make test_decimal discoverable (GH-106209) (#106230)
334b95b
gh-89392: Make test_decimal discoverable (GH-106209)
(cherry picked from commit 0e24499)

Co-authored-by: Serhiy Storchaka <[email protected]>
ambv pushed a commit that referenced this pull request Jul 5, 2023
@miss-islington @serhiy-storchaka
[3.11] gh-89392: Make test_decimal discoverable (GH-106209) (#106229)
33fb895
(cherry picked from commit 0e24499)

Co-authored-by: Serhiy Storchaka <[email protected]>
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes
@zware zware zware approved these changes
@rhettinger rhettinger Awaiting requested review from rhettinger

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

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.

5 participants

@serhiy-storchaka @miss-islington @bedevere-bot @zware @erlend-aasland
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.