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: Increase Argument Clinic CLI test coverage by erlend-aasland · Pull Request #107156 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Jul 23, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicWholeFileTest ClinicExternalTest test suite.

TODO:

  • Remove tmp stuff from test_external, use -o to redirect the output, and simply compare the redirected output with clinic.test.c
  • A new test that verifies that the file is not touched if no changes are made (currently a part of test_external)
  • A test that verifies that an incorrect output checksum (and the generated output) is regenerated if -f is given
  • Test verbose mode
  • 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: Increase Argument Clinic CLI test coverage
12c0dc7
Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicWholeFileTest test suite.
@bedevere-bot bedevere-bot mentioned this pull request Jul 23, 2023
Increase Argument Clinic test coverage #106368
Closed
@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Jul 23, 2023
@erlend-aasland erlend-aasland added the skip news label Jul 23, 2023
erlend-aasland added 5 commits July 23, 2023 23:23
@erlend-aasland
Add test for the --converters opt
e09e416
@erlend-aasland
Fix converters test
f9d637b
@erlend-aasland
Split test_external in two
9f617de
test_external: run clinic on clinic.test.c

test_no_change: check that dest is left unchanged if content does not change
@erlend-aasland
Test force/no-force runs
39ee0eb
@erlend-aasland
Test verbose mode
a3f505e
@erlend-aasland
erlend-aasland marked this pull request as ready for review July 23, 2023 22:36
@erlend-aasland
erlend-aasland requested a review from AlexWaygood as a code owner July 23, 2023 22:36
@bedevere-bot bedevere-bot added the awaiting core review label Jul 23, 2023
@erlend-aasland
erlend-aasland requested a review from sobolevn July 23, 2023 22:37
@erlend-aasland

erlend-aasland commented Jul 23, 2023

Copy link
Copy Markdown
Contributor Author

FWIW; this messes up test coverage locally; that's solvable (IIRC), though.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Jul 23, 2023

Copy link
Copy Markdown
Contributor Author

The coveragerc file that's included in the sources disables coverage for if __name__ == "__main__", which is unfortunate; we should change that.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
Add test cleanup to test_external
ff6a33c
sobolevn
sobolevn reviewed Jul 24, 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.

Better error messages :)

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with rocket emoji
All reactions
  • 🚀 1 reaction
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 and others added 2 commits July 24, 2023 10:12
@erlend-aasland @sobolevn
Update Lib/test/test_clinic.py
e97414c
Co-authored-by: Nikita Sobolev <[email protected]>
@erlend-aasland @sobolevn
Update Lib/test/test_clinic.py
e048663
Co-authored-by: Nikita Sobolev <[email protected]>
@erlend-aasland

erlend-aasland commented Jul 24, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for the review, Nikita!

All reactions

Sorry, something went wrong.

Uh oh!

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

sobolevn
sobolevn approved these changes Jul 24, 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 commented Jul 24, 2023
View reviewed changes
Comment thread Lib/test/test_clinic.py Resolved

Uh oh!

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

erlend-aasland added 2 commits July 24, 2023 15:05
@erlend-aasland
Pull in main
8791822
@erlend-aasland
Improve accuracy of test_cli_converters
a4adb70
@erlend-aasland
erlend-aasland requested a review from sobolevn July 24, 2023 15:47
sobolevn
sobolevn approved these changes Jul 24, 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.

Looks great! 👍

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@erlend-aasland
erlend-aasland merged commit 83a2837 into python:main Jul 24, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label Jul 24, 2023
@erlend-aasland
erlend-aasland deleted the clinic/coverage-cli branch July 24, 2023 18:49
@erlend-aasland erlend-aasland added the needs backport to 3.11 only security fixes label Jul 24, 2023
@erlend-aasland erlend-aasland added the needs backport to 3.12 only security fixes label Jul 24, 2023
@miss-islington

miss-islington commented Jul 24, 2023

Copy link
Copy Markdown
Contributor

Thanks @erlend-aasland 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

miss-islington commented Jul 24, 2023

Copy link
Copy Markdown
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

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 Jul 24, 2023
@erlend-aasland @sobolevn @miss-islington
pythongh-106368: Increase Argument Clinic CLI test coverage (pythonGH…
d867999
…-107156)

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

(cherry picked from commit 83a2837)

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

bedevere-bot commented Jul 24, 2023

Copy link
Copy Markdown

GH-107189 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 24, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 24, 2023
@erlend-aasland @sobolevn @miss-islington
pythongh-106368: Increase Argument Clinic CLI test coverage (pythonGH…
bd0c8b6
…-107156)

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

(cherry picked from commit 83a2837)

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

bedevere-bot commented Jul 24, 2023

Copy link
Copy Markdown

GH-107190 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 24, 2023
erlend-aasland added a commit that referenced this pull request Jul 24, 2023
@miss-islington @erlend-aasland @sobolevn
[3.12] gh-106368: Increase Argument Clinic CLI test coverage (GH-107156…
69d4e8c
…) (#107189)

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

(cherry picked from commit 83a2837)

Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
erlend-aasland added a commit that referenced this pull request Jul 26, 2023
@miss-islington @erlend-aasland @sobolevn
[3.11] gh-106368: Increase Argument Clinic CLI test coverage (GH-107156…
6bf2c29
…) (#107190)

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

(cherry picked from commit 83a2837)

Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 26, 2023
@miss-islington @erlend-aasland @sobolevn
[3.11] pythongh-106368: Increase Argument Clinic CLI test coverage (p…
cebe60b
…ythonGH-107156) (python#107190)

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

(cherry picked from commit 83a2837)

Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
jtcave pushed a commit to jtcave/cpython that referenced this pull request Jul 27, 2023
@erlend-aasland @sobolevn @jtcave
pythongh-106368: Increase Argument Clinic CLI test coverage (python#1…
1da869f
…07156)

Instead of hacking into the Clinic class, use the Argument Clinic tool
to run the ClinicExternalTest test suite.

Co-authored-by: Nikita Sobolev <[email protected]>
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
@AlexWaygood AlexWaygood Awaiting requested review from AlexWaygood

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.

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.