Crash when collecting reports
ericvergnaud opened this issue · 4 comments
ericvergnaud commented
pytest-cov crashes when pytest-asyncio is installed and used (i.e. some tests are `async).
The crash is as follows:
DataError: Can't combine statement coverage data with branch data
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
config.hook.pytest_runtestloop(session=session)
From the reference, it seems the culprit is pytest-asyncio using an old style event loop ?
seifertm commented
Can you provide a small example that reproduces the error?
ericvergnaud commented
Mmm... can't reproduce it anymore. Maybe it was caused by a corrupt venv...
ericvergnaud commented
I can reproduce it again, and also found the following:
nedbat/coveragepy#512
The code I'm testing creates child processes, so it smells like the issue is not within asyncio, although disabling it prevents execution of the code that triggers it
seifertm commented
@ericvergnaud Thanks for the update. Let us know if there's anything to investigate from pytest-asyncio side.