Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow overriding of data file location #145
For various reasons it'd be useful to be able to specify the location of the data file.
The path to the file was hard-coded in a14e746 which makes sense to fix the issue for sub-processes, but some environments don't allow writing to the CWD (certain Docker setups).
@ionelmc That sounds what I was looking for.
I don't have an easy to reproduce example at the moment, but the general gist is that we're trying to run tests in a Docker container with a command that is running as a non-privileged user and which has the app code (the host's CWD) mounted as a volume. The restrictions of Docker's volume implementation basically makes any volume owned by root inside the container. I realize that this is an edge case, but since coverage.py allows setting the data file as well and I don't see a reason for this to be hardcoded in pytest-cov, and I hoped this would be an easy fix®.