-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Pytest version 6.2.3:
This works:
def pytest_cmdline_preparse(args):
args[:] = ["--verbose"] + args
args[:] = ["--color=yes"] + args
args[:] = ["--tb=short"] + args
This does not work (still show warning in command line)
def pytest_cmdline_preparse(args):
args[:] = ["-W ignore::pytest.PytestUnknownMarkWarning"] + args
args[:] = ["-W ignore::DeprecationWarning"] + args
calling pytest from command line and give "-W ignore::DeprecationWarning" it is working as expected (all DeprecationWarning will be ignored). But adding it to cmdline_preparse function nothing will be ignored.
The code above worked with pytest 5.0.0 as we have used it until upgrade.
Metadata
Metadata
Assignees
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: bugproblem that needs to be addressedproblem that needs to be addressed