FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-106368: Increase Argument Clinic CLI test coverage by erlend-aasland · Pull Request #107277 · python/cpython · GitHub

/ cpython Public

gh-106368: Increase Argument Clinic CLI test coverage - #107277

Merged
erlend-aasland merged 1 commit into
python:mainfrom
erlend-aasland:clinic/more-cli-coverage
Jul 26, 2023
Merged

gh-106368: Increase Argument Clinic CLI test coverage#107277
erlend-aasland merged 1 commit into
python:mainfrom
erlend-aasland:clinic/more-cli-coverage

Conversation

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

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

  • Add test cases for invalid CLI option combinations.

- Add test case for directory traversal

- Add test cases for invalid CLI option combinations.

Copy link
Copy Markdown
Contributor Author

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

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",):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

erlend-aasland merged commit 579100f into python:main 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.
🐍🍒⛏🤖

erlend-aasland deleted the clinic/more-cli-coverage branch July 26, 2023 06:34

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

Copy link
Copy Markdown

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 26, 2023
…-107277)

(cherry picked from commit 579100f)

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

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

erlend-aasland added a commit that referenced this pull request Jul 26, 2023
…) (#107282)

(cherry picked from commit 579100f)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
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

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown

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

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 26, 2023
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL