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 verbose configuration option value check #1060

Closed
wants to merge 1 commit into from

Conversation

stephane
Copy link

@stephane stephane commented Apr 19, 2023

This commit corrects the check for the 'verbose' configuration option value. Previously, it was checked if the value was strictly greater than 0, but the use of '-v' flag sets the value to 0.

Edit: My original patch changed to verbose = config.getoption("verbose") >= 0 in fixtures.py.

@stephane
Copy link
Author

stephane commented Apr 19, 2023

May be the right fix is to change the message "(add -v option to show queries)" to "(add -v -v option to show queries)"

@bluetech
Copy link
Member

but the use of '-v' flag sets the value to 0.

I may be confused but I'm pretty sure passing -v sets verbosity to 1, not 0. If so, then the current code is correct. Perhaps you are passing -q somewhere? A -q reduces the verbosity by 1, so -q -v ends up 0.

@bluetech bluetech closed this Jan 30, 2024
@stephane
Copy link
Author

stephane commented Feb 1, 2024

I didnt use other flags...

@bluetech
Copy link
Member

bluetech commented Feb 1, 2024

Maybe it's in your pytest config or in PYTEST_ADDOPTS envvar.

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.

None yet

2 participants