Closed JulienPalard closed 5 years ago
I don't think it's a pytest-vcr problem: I'm getting the same error with just VCR.py (script below). The error happens when the request is replayed, not on the first recording.
I think what we are seeing is the result of this bug: https://github.com/kevin1024/vcrpy/pull/397. The fix was not released yet, but you can try it by installing from git: git+https://github.com/kevin1024/vcrpy/@8fdc6dbb68ee59f1f92f6dcb8d5c16b6207d22ca#egg=vcrpy
.
The test I've run without plugin, I've uninstalled pytest-vcr from the environment used for tests, just in case:
import aiohttp
import vcr
async def test_mdk():
with vcr.use_cassette('cassettes/test_mdk.yaml'):
async with aiohttp.ClientSession() as session:
async with session.get("https://mdk.fr") as resp:
assert resp.status == 200
Looks like you're right, I may have tried too fast and was unable to reproduce the issue with vcrpy only.
I found a bug with pytest-aiohttp / pytest / aiohttp / pytest-vcr:
I cannot reproduce this bug with vcrpy only, where I'm having a warning:
RuntimeWarning: coroutine 'handle_coroutine' was never awaited
.