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-106368: Clean up Argument Clinic tests by erlend-aasland · Pull Request #106373 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Jul 3, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Increase Argument Clinic test coverage #106368

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
pythongh-106368: Clean up Argument Clinic tests
2197527
@erlend-aasland erlend-aasland added skip news needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jul 3, 2023
@bedevere-bot bedevere-bot added awaiting core review tests Tests in the Lib/test dir labels Jul 3, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jul 3, 2023
Increase Argument Clinic test coverage #106368
Closed
@erlend-aasland

erlend-aasland commented Jul 3, 2023

Copy link
Copy Markdown
Contributor Author

If we're going to increase coverage for Argument Clinic, we need to clean up the test code a little bit; we need readable tests, and we need to be able to debug existing tests without pulling our hair.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
erlend-aasland requested a review from sobolevn July 3, 2023 20:42
sobolevn
sobolevn reviewed Jul 3, 2023
View reviewed changes

@sobolevn sobolevn 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.

Thanks for doing this, in my opinion, it is much more readable now.

Sorry, something went wrong.

Uh oh!

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

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

Uh oh!

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

Comment thread Lib/test/test_clinic.py Resolved

Uh oh!

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

@erlend-aasland
Add checkDocstring helper
39b09d4
@erlend-aasland
erlend-aasland requested a review from sobolevn July 3, 2023 21:26
sobolevn
sobolevn approved these changes Jul 3, 2023
View reviewed changes

@sobolevn sobolevn 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.

👍

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
erlend-aasland enabled auto-merge (squash) July 3, 2023 21:32
@erlend-aasland

erlend-aasland commented Jul 3, 2023

Copy link
Copy Markdown
Contributor Author

After gh-106373, we should make the test_disallowed_* tests more accurate. Most of them simply run self.parse_function_should_fail without checking the error message. This makes it hard to verify that the test is checking the right path.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
erlend-aasland merged commit 3ee8dac into python:main Jul 3, 2023
@miss-islington

miss-islington commented Jul 3, 2023

Copy link
Copy Markdown
Contributor

Thanks @erlend-aasland 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 core review label Jul 3, 2023
@miss-islington

miss-islington commented Jul 3, 2023

Copy link
Copy Markdown
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 3ee8dac7a1b3882aa3aac7703bdae2de7b6402ad 3.12

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned erlend-aasland Jul 3, 2023
@miss-islington

miss-islington commented Jul 3, 2023

Copy link
Copy Markdown
Contributor

Sorry @erlend-aasland, I had trouble checking out the 3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 3ee8dac7a1b3882aa3aac7703bdae2de7b6402ad 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Jul 3, 2023

Copy link
Copy Markdown

GH-106379 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 Jul 3, 2023
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 3, 2023
@erlend-aasland
[3.12] pythongh-106368: Clean up Argument Clinic tests (python#106373)
e3a1cbd
(cherry picked from commit 3ee8dac)

Co-authored-by: Erlend E. Aasland <[email protected]>
@erlend-aasland
erlend-aasland deleted the clinic/clean-up-tests branch July 3, 2023 22:04
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 3, 2023
@erlend-aasland
[3.11] pythongh-106368: Clean up Argument Clinic tests (python#106373)
098f500
(cherry picked from commit 3ee8dac)

Co-authored-by: Erlend E. Aasland <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 3, 2023

Copy link
Copy Markdown

GH-106381 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 Jul 3, 2023
erlend-aasland added a commit that referenced this pull request Jul 3, 2023
@erlend-aasland
[3.12] gh-106368: Clean up Argument Clinic tests (#106373) (#106379)
38fe0e7
(cherry picked from commit 3ee8dac)
erlend-aasland added a commit that referenced this pull request Jul 3, 2023
@erlend-aasland
[3.11] gh-106368: Clean up Argument Clinic tests (#106373) (#106381)
3fdda97
(cherry picked from commit 3ee8dac)
carljm added a commit to carljm/cpython that referenced this pull request Jul 4, 2023
@carljm
Merge branch 'main' into cachedpropdoublecheck
7a7fd43
* main:
  pythongh-106368: Increase Argument Clinic test coverage (python#106389)
  pythongh-106320: Fix _PyImport_GetModuleAttr() declaration (python#106386)
  pythongh-106368: Harden Argument Clinic parser tests (python#106384)
  pythongh-106320: Remove private _PyImport C API functions (python#106383)
  pythongh-86085: Remove _PyCodec_Forget() declaration (python#106377)
  pythongh-106320: Remove more private _PyUnicode C API functions (python#106382)
  pythongh-104050: Annotate more Argument Clinic DSLParser state methods (python#106376)
  pythongh-106368: Clean up Argument Clinic tests (python#106373)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn approved these changes

Uh oh!

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

Assignees

@erlend-aasland erlend-aasland

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.

4 participants

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