-
Notifications
You must be signed in to change notification settings - Fork 211
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
coverage.misc.CoverageException: Couldn't use data file '/path/to/.coverage': UNIQUE constraint failed: meta.key #398
Comments
You're probably running into something similar to #386 There's a way to avoid this issue. In your
In your Lastly, make sure you have your dependencies locked down to Without these settings, I am able to reproduce this same issue pretty easily because it'll use coverage 5. With these settings active you won't run into it anymore. It's a workaround until a coverage5-compatible approach is documented, but it works. |
It would seem that dropping back to So the options are either (Using |
This can be related to nedbat/coveragepy#883 (comment) |
Brilliant! Much appreciated! |
I believe this is the documentation that's being referred to: https://pytest-cov.readthedocs.io/en/latest/tox.html?highlight=clean#tox |
Summary
Trying to run
pytest-cov
in parallel but getting a unique key constraint on the .coverage SQLite3 database.Expected vs actual result
Here's the traceback from the run:
(Enclosed tox.ini and pytest.ini)
Reproducer
Versions
pytest version 5.4.1
pytest-cov-2.8.1
tox: 3.14.5
Make sure you include complete output of
tox
if you use it (it will show versions of various things).ini_files.zip
The text was updated successfully, but these errors were encountered: