I want to set the argument python_files
in pytest. The documentation says you need to put it in a configuration file, but I want to include it in the command line as part of the call to py.test
, so I won't have to add that configuration file. Is that possible?
It is not possible with pytest out of the box as it is now (2.8). The pytest parser knows about command-line options (addoption/getoption
) and config file values (addini/getini
) but they are quite separate.
It is probably possible to write a plugin to add python_files
(or any other ini value) as a command-line option. But just adding a conftest file is certainly the simpler option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With