I am learning pytest for use in our lab and we use multiple machines with different test configurations. Each machine has it's own conftest file with parameters specific to it's test environment, e.g ipaddresses of test box, etc. Pytest is run from each local machine (../pytest/cfg/machine1) which contains its conftest file. The pytest executable is in a remote directory. So the command is:
# ../pytest/cfg/machine1 py.test -vs /dir/path/to/pytest/executable
This worked fine until I added a custom option. Now it appears that pytest can no longer find the conftest file in the directory I'm running it from. I found an undocumented option --confcutdir which seems to correct the problem.
Is this the best solution and why is this occuring the first place? The pytest documentation is not very clear on why this fails or how to correct it.