You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I use the decorator without passing any record_mode (@pytest.mark.vcr), I get an error saying,
vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/path/test_single.yaml') in your current record mode ('none').
The VCR docs says the default mode is "once" and pytest-recording doesn't mention the default mode, implying it follows VCR's.
I completely missed mentioning it in the docs - this behavior is intentional to avoid network calls by default. It was a major problem at kiwi.com when I was working there, and therefore we choose a more conservative approach here. I'll update the docs soon.
Unfortunately, when you do that, passing options to pytest doesn't overwrite it... e.g. pytest --record-mode=rewrite would still execute with once. Should I open another issue for that or is there another trick I don't know about?
Describe the bug
When I use the decorator without passing any record_mode (
@pytest.mark.vcr
), I get an error saying,The VCR docs says the default mode is "once" and pytest-recording doesn't mention the default mode, implying it follows VCR's.
To Reproduce
Use the sample test in the docs,
Expected behaviour
No errors.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: