Pytest: environment variable to specify the location of pytest.ini

How do I set an environment variable with a location pytest.ini

, tox.ini

or setup.cfg

to run pytest

by default?

I created a docker container with a volume pointing to my project directory so every change I make is visible inside the docker container as well. The problem is that I have a file pytest.ini

in the root of my project that will not apply to the docker container.

So, I want to set an environment variable inside a docker container to indicate where to look for the pytest config. Does anyone know how I can do this?

+3


source to share


1 answer


There is no way to do this. You can use a different configuration using pytest pytest -c

, but tox.ini

and setup.cfg

should be in the top-level directory of your package, next to the setup.py

.



+1


source







All Articles