Closed paxcodes closed 3 years ago
Thank you for pointing this out!
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.
The docs are updated
@Stranger6667 For my personal case I wanted to have once
by default, so I set the config:
@pytest.fixture(scope="module")
def vcr_config():
return {
"record_mode": "once",
}
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?
@arthurio Yes, please, open a separate issue for it
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):