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

Clarify docs on specifying multiple filters with pytest.mark.filterwarnings #12966

Open
soxofaan opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@soxofaan
Copy link
Contributor

Specifying multiple filterwarnings filter in the correct order can be a bit confusing.

When using @pytest.mark.filterwarnings as decorator, one has to use the reverse order compared to stdlib's warnings.filterwarnings (because of the order that decorators are evaluated).
When using pytestmark (list of pytest.mark.filterwarnings marks), it's the other way around.

I think this deserves a bit of clarification in the docs

FYI: I'm actually already working on a PR for this

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

No branches or pull requests

1 participant