Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix option error #10608

Merged
merged 6 commits into from Jan 19, 2023
Merged

Fix option error #10608

merged 6 commits into from Jan 19, 2023

Conversation

markshao
Copy link
Contributor

@markshao markshao commented Dec 24, 2022

Close #10592

if the cmdline contains both the --cache-show and --help option will cause the internal error . But if contains the --collect-only and --help will just output the help message.

the root cause is inside pytest_cmdline_main of cacheprovider , it will really execute the wrap_session , but it will raise exception due to missing variable assignment . so add the condition express to avoid the conflict .

@markshao markshao marked this pull request as draft December 24, 2022 03:39
@markshao markshao marked this pull request as ready for review December 24, 2022 03:40
@markshao markshao closed this Dec 24, 2022
@markshao markshao reopened this Dec 24, 2022
@markshao markshao closed this Dec 24, 2022
@markshao markshao reopened this Dec 24, 2022
@markshao markshao closed this Dec 24, 2022
@markshao markshao deleted the fix-option-error branch December 24, 2022 07:27
@markshao markshao restored the fix-option-error branch December 24, 2022 07:27
@markshao markshao reopened this Dec 24, 2022
@markshao markshao marked this pull request as draft December 24, 2022 12:22
@markshao markshao marked this pull request as ready for review December 24, 2022 12:24
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Hi @markshao,

Thanks for the PR!

Can you include a simple integration test to ensure this does not regress in the future? Thanks!

markshao and others added 2 commits January 13, 2023 21:43
update rst message

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
@markshao
Copy link
Contributor Author

Hi @markshao,

Thanks for the PR!

Can you include a simple integration test to ensure this does not regress in the future? Thanks!

Added , pls take a look

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks!

@nicoddemus nicoddemus merged commit 4d4ed42 into pytest-dev:main Jan 19, 2023
@markshao markshao deleted the fix-option-error branch January 30, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

py.test --cache-show --help triggers an internal error
2 participants