Replies: 1 comment
-
|
yeah, you're reading it right. This is basically the same split as #8759 (comment)
For CLI you'd need the concrete module name, or keep the package-wide regex case in config. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to understand pytest’s warning filter behavior for CLI
-Woptions vsfilterwarningsin config.This works in
tox.ini:But the equivalent CLI form does not seem to work:
python -m pytest -W error -W "ignore::UserWarning:tests.*"while this DOES work:
python -m pytest -W error -W "ignore::UserWarning:tests.test_utils"Looking at
_pytest/config/__init__.py, it appears CLI-Wfilters are parsed withescape=True:which seems to force exact module matching for CLI filters.
Am I understanding correctly that wildcard/regex module matching is intentionally unsupported for CLI
-W, and only supported in config-filefilterwarnings?Beta Was this translation helpful? Give feedback.
All reactions