-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
plugin: warningsrelated to the warnings builtin pluginrelated to the warnings builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Considering a simple test which raises a warning and a pytest.ini
file:
import warnings
def test_foo():
warnings.warn(UserWarning('oh no'))
[pytest]
filterwarnings =
error
Running with $ pytest -W ignore
still makes the warning an error. I believe this is a bug and command-line options should take precedence over ini-options.
(Follow-up from #3945).
In summary the current precedence order is:
- mark
- ini file
- cmdline option
IMHO this should be instead:
- mark
- cmdline option
- ini
Metadata
Metadata
Assignees
Labels
plugin: warningsrelated to the warnings builtin pluginrelated to the warnings builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed