Skip to content
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

locking the coverage file before use #217

Open
notestaff opened this issue Jul 31, 2018 · 4 comments
Open

locking the coverage file before use #217

notestaff opened this issue Jul 31, 2018 · 4 comments

Comments

@notestaff
Copy link

Maybe, lock the coverage data file with something like https://pypi.org/project/filelock/ before reading/writing it? When using pytest-cov on Travis-CI with --cov-append, several jobs from the job matrix might be using the file concurrently.

@ionelmc
Copy link
Member

ionelmc commented Aug 8, 2018

Wouldn't the jobs run in separate containers/vms?

@RonnyPfannschmidt
Copy link
Member

travis jobs run in separate containers/vm's

@RonnyPfannschmidt
Copy link
Member

also note that coverage has a multi-process mode that works correct - its based on adding pids to coverage files and combining after runs, since anything else does not work without blocking

@JulienPalard
Copy link
Contributor

JulienPalard commented Jun 27, 2020

Using a distinct COVERAGE_FILE per worker should help, see: nedbat/coveragepy#883 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants