pytest: environment variable to specify pytest.ini location

Viewed 8505

How can I set an environment variable with the location of the pytest.ini, tox.ini or setup.cfg for running pytest by default?

I created a docker container with a volume pointing to my project directory, so every change I make is also visible inside the docker container. The problem is that I have a pytest.ini file on my project root which won't apply to the docker container.

So I want to set an environment variable inside the docker container to specify where to look for the pytest configuration. Does anyone have any idea how could I do that?

1 Answers
Related