-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
plugin: warningsrelated to the warnings builtin pluginrelated to the warnings builtin plugintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
Description
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
Metadata
Metadata
Assignees
Labels
plugin: warningsrelated to the warnings builtin pluginrelated to the warnings builtin plugintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification