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: ape test -vvv was not using correct pytest verbosity #2303

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Sep 27, 2024

What I did

-vvv was no longer failing as of recent changes but it also wasn't using the correct pytest verbosity.
The PR makes it actually work in pytest.

Actually really need this for the work I am doing with the snapshotting

How I did it

a few things had to be fixed, was more difficult than would have liked:

  1. In the Pytest plugin itself, verbosity was always getting downgraded in certain conditions; had to make it not do that if the verbosity was already higher than what it would set if it was doing that shit.
  2. Make a custom command for ape test to handle parsing args. It needed to parse the -v before click otherwise couldnt get it to work with -v without a value error, even with callback.
  3. The validaion of pytest args was ignoing the case of -v by itself in the middle where the next arg isnt an ape verbosity lvl

How to verify it

Run:

ape test -vvv

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

fubuloubu
fubuloubu previously approved these changes Sep 27, 2024
@antazoey antazoey merged commit a521edc into ApeWorX:main Sep 27, 2024
16 checks passed
@antazoey antazoey deleted the fix/vvv branch September 27, 2024 20:09
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.

2 participants