-
Notifications
You must be signed in to change notification settings - Fork 214
pytest-cov makes test fail by putting a temporary file into cwd #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you tried to set something like this in
|
Thanks for the pointer, I tried it: Still getting this failing test:
Hmm, maybe this is not a temporary file of coverage, but a lock/pid file of pytest-cov? |
Strange. Are you using xdist? That file name appears to be suffixed from here |
Well, not by myself / not knowingly, but the tests run on travis-ci.org and they somehow have 1 worker per test environment. |
Can you post a link to the build? On Saturday, August 8, 2015, TW [email protected] wrote:
Thanks, |
https://travis-ci.org/borgbackup/borg/builds/74696354 < hah! was just some vague feeling, that I maybe should try <2.0.0 - and it works now! :) |
Having a hard time figuring out how the reproduce your issue. IOW, Do you do anything special for coverage configuration (besides having a |
Well, the test fail issue just went away as soon as I put <2.0.0 in my requirements file. |
I've managed to get your project to work as expected, see: Diff: borgbackup/borg@master...ionelmc:master The esential parts:
I think the real bug here is that pytest-cov forgets about the .coveragerc Thanks, On Sun, Aug 9, 2015 at 1:22 PM, TW [email protected] wrote:
|
Use absolute paths for coverage config file and sources. Add a new internal variable "COV_CORE_DATAFILE" to workaround the misplacement of .coverage.foobar.123 files. Because needs to be an absolute path COV_CORE_CONFIG we need to do some special things: coverage treats config_file='.coveragerc' as if it was config_file=True. We need to keep that behavior. Closes #94. Closes #77.
The cwd change issue is getting fixed in #95 if you wanna give it a try. |
i have tests that check if some specific files have been extracted into cwd.
they fail when using pytest-cov because some .coverage* file gets created there.
is there any way to avoid this?
The text was updated successfully, but these errors were encountered: