Conflicting custom arguments does not raise obvious error #12824
Labels
topic: config
related to config handling, argument parsing and config file
type: bug
problem that needs to be addressed
Tests found but deselected when running pytest when attempting to use
addoption
command line parsing for custom argument--keyword
.Test selection would note that tests were found but not selected. I believe this is a bug/undefined behaviour that occurs due to
--keyword
being shortened to-k
(by convention and hence probably by pytest?). Created a basic working example to show the behaviour.conftest.py
pytest_bug.py
Gives the following input and output
Given the confusing output it seems to me that this is buggy behaviour that should be warned about.
I think this requires an extension of code at pytest/src/_pytest/config/argparsing.py#L379
The text was updated successfully, but these errors were encountered: