-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Warnings plugin's "once" filtering not working as expected #2586
Labels
plugin: warnings
related to the warnings builtin plugin
Comments
This was referenced Jul 18, 2017
Thanks @renemilk for the report! |
This was referenced Oct 19, 2018
#4104 only changed behavior of recwarn on python 2.x so this is probably somewhere else in the stack |
Seems to have been fixed in the meantime:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is probably related to #1043, but that was reported before the pytest_warnings plugin was merged into pytest proper.
What I'm seeing is a warning recorded for every realization of a parameterized fixture instead of only one.
Now given this mwe.py:
I expected
pytest -s -W once::DeprecationWarning mwe.py
to print exactly one notice for the warning.I get all three, however:
Running
python -W once::DeprecationWarning mwe.py
shows what I was expecting:edit: improved formatting
The text was updated successfully, but these errors were encountered: