coverage.misc.CoverageException: Couldn't use data file: Safety level may not be changed inside a transaction
See original GitHub issueHello and thank you for your work on this project.
A possible incompatibility between pytest-cov
and coverage
versions greater than 5.0.0 is causing tests to fail in my company’s projects. To resolve this problem, our team has pinned coverage
to version 4.4 in test-requirements.txt.
After cloning this repo, I noticed that tests are failing when I run them locally and the coverage50 env is set. Have you witnessed this error before and is it possible that coverage
ought to be pinned down to < 5.0.0 in the requirements file here?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
coverage.misc.CoverageException: Couldn't use data file ...
coverage.misc.CoverageException: Couldn't use data file: Safety level may not be changed inside a transaction #404.
Read more >python - Pytest coverage.py errror - Stack Overflow
I unit testing python code and running command pytest --cov , test is running fine but coverage is not ...
Read more >Change history for coverage.py - Read the Docs
Fix: the coverage data file is now created in a more robust way, ... In 6.0, the coverage.py exceptions moved from coverage.misc to...
Read more >pytest-cov - PyPI
Pytest plugin for measuring coverage. ... The data file is left at the end of testing so that it is possible to use...
Read more >2022 Publication 17 - IRS
situation and is not intended to replace the law or change ... Health coverage tax credit is not ... get a social security...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nedbat - Thank you for your response! The command I ran that fails is
tox -e py3-pytest52-xdist30-coverage50
on master in pytest-cov. When I run these tests, I see the same error on each failed test that I see in my own projects when attepting to run tox, which is to say:@patti-c Coverage 5.0 is new, and we are working out the problems. We are not going to pin coverage in pytest-cov, instead we will be trying to fix the problems in coverage.
Can you give us instructions for reproducing the problem? What repo are you running, at which commit, and what commands are you running to see the problem?