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 #107277 · python/cpython

Conversation

@erlend-aasland

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

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Add test case for directory traversal

  • Add test cases for invalid CLI option combinations.

  • 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
207fd5b
- Add test case for directory traversal

- Add test cases for invalid CLI option combinations.
@erlend-aasland
erlend-aasland requested a review from AlexWaygood as a code owner July 25, 2023 23:14
@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 25, 2023
@erlend-aasland
erlend-aasland requested a review from sobolevn July 25, 2023 23:14
@bedevere-bot bedevere-bot mentioned this pull request Jul 25, 2023
Increase Argument Clinic test coverage #106368
Closed
@bedevere-bot bedevere-bot added awaiting core review tests Tests in the Lib/test dir labels Jul 25, 2023
@erlend-aasland

erlend-aasland commented Jul 25, 2023

Copy link
Copy Markdown
Contributor Author

With this PR, we're up in 88% coverage.

All reactions

Sorry, something went wrong.

Uh oh!

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

sobolevn
sobolevn approved these changes Jul 26, 2023
View reviewed changes
Comment thread Lib/test/test_clinic.py
self.assertIn(msg, out)

def test_cli_fail_filename_or_output_and_make(self):
for opts in ("-o", "out.c"), ("filename.c",):

@sobolevn sobolevn Jul 26, 2023

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.

Style nit:

Suggested change
for opts in ("-o", "out.c"), ("filename.c",):
for opts in [("-o", "out.c"), ("filename.c",)]:

For me, this is much more readable.

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
erlend-aasland merged commit 579100f into python:main Jul 26, 2023
@miss-islington

miss-islington commented Jul 26, 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 26, 2023
@erlend-aasland
erlend-aasland deleted the clinic/more-cli-coverage branch July 26, 2023 06:34
@miss-islington

miss-islington commented Jul 26, 2023

Copy link
Copy Markdown
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 579100f6d75a27429e7f8de74935d7bc3a3e44e6 3.11

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 26, 2023
@bedevere-bot

bedevere-bot commented Jul 26, 2023

Copy link
Copy Markdown

GH-107282 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.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 26, 2023
@erlend-aasland @miss-islington
pythongh-106368: Increase Argument Clinic CLI test coverage (pythonGH…
ff88620
…-107277)

(cherry picked from commit 579100f)

Co-authored-by: Erlend E. Aasland <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 26, 2023
@erlend-aasland

erlend-aasland commented Jul 26, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland added a commit that referenced this pull request Jul 26, 2023
@miss-islington @erlend-aasland
[3.12] gh-106368: Increase Argument Clinic CLI test coverage (GH-107277…
ef80851
…) (#107282)

(cherry picked from commit 579100f)

Co-authored-by: Erlend E. Aasland <[email protected]>
@erlend-aasland erlend-aasland added needs backport to 3.11 only security fixes and removed needs backport to 3.11 only security fixes labels Jul 26, 2023
@miss-islington

miss-islington commented Jul 26, 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

miss-islington commented Jul 26, 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 579100f6d75a27429e7f8de74935d7bc3a3e44e6 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 26, 2023

Copy link
Copy Markdown

GH-107326 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.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 26, 2023
@erlend-aasland
[3.11] pythongh-106368: Increase Argument Clinic CLI test coverage (p…
483db97
…ython#107277)

(cherry picked from commit 579100f)
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 26, 2023
erlend-aasland added a commit that referenced this pull request Jul 26, 2023
@erlend-aasland
[3.11] gh-106368: Increase Argument Clinic CLI test coverage (#107277) (
9edeeb2
#107326)

(cherry picked from commit 579100f)
jtcave pushed a commit to jtcave/cpython that referenced this pull request Jul 27, 2023
@erlend-aasland @jtcave
pythongh-106368: Increase Argument Clinic CLI test coverage (python#1…
3935d5f
…07277)
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

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