In .coveragerc, section [run] set data_file to /var/tmp/test/inner/.coverage
Run any test with that.
FileNotFoundError is raised.
My proposition:
I'd like for that to just create the directory structure for the file. I think it can be done with os.path.dirname() and os.makedirs() here https://github.com/nedbat/coveragepy/blob/master/coverage/data.py#L495
Should that be OK?
Is there any reason not to implement that?
More context:
I'd use that when measuring coverage in an application's Docker container. Sadly, I can't just use whatever directory there is and then just issue a docker cp with a wildcard pattern to get all the .coverage.* files from the container before merging the data, because that's not implemented moby/moby#7710 I can work around that, but maybe it'd just be nice if I didn't have to.
The text was updated successfully, but these errors were encountered:
Reproduction:
/var/tmp/test
[run]
setdata_file
to/var/tmp/test/inner/.coverage
My proposition:
I'd like for that to just create the directory structure for the file. I think it can be done with
os.path.dirname()
andos.makedirs()
here https://github.com/nedbat/coveragepy/blob/master/coverage/data.py#L495Should that be OK?
Is there any reason not to implement that?
More context:
I'd use that when measuring coverage in an application's Docker container. Sadly, I can't just use whatever directory there is and then just issue a
docker cp
with a wildcard pattern to get all the.coverage.*
files from the container before merging the data, because that's not implemented moby/moby#7710 I can work around that, but maybe it'd just be nice if I didn't have to.The text was updated successfully, but these errors were encountered: