pytest icon indicating copy to clipboard operation
pytest copied to clipboard

`Config.known_args_namespace` contains duplicate value

Open bluetech opened this issue 5 months ago • 0 comments
trafficstars

While looking at another issue I noticed that pytest -Werror results in config.known_args_namespace.pythonwarnings having the value ['error', 'error']. That is the value is duplicated.

This happens because:

It's not actively harmful for -W but might be for other cases. Possibly it only affects builtin options so might only affect -W -- I didn't dig too deep.

The second parse was added in https://github.com/pytest-dev/pytest/pull/7721/commits/0a27f69a928f50287f3bc65c5f78e789475f1eeb

bluetech avatar Jun 03 '25 12:06 bluetech