Fix VCR examples for VCR off#550
Merged
Merged
Conversation
Collaborator
|
thanks @maelle |
Member
Author
|
@sckott do you think this is a correct fix? |
Collaborator
|
Sorry for delay @maelle - I was trying to figure it out locally for a while, then got busy with work and life. I'll look again ASAP |
Member
Author
|
Friendly reminder, but no pressure 😸 |
Member
Author
|
@sckott friendly reminder 😸 |
Collaborator
|
@maelle fixed that last thing in the test. Can you take a look? Or did you already think it was good to go? |
|
I'm quite certain that fixes the issue for my part (tried cmd check in vanilla mode and everything went fine) |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @drmowinckels
This is not tested and not enough.
When I try to run examples that use vcr when VCR is off, I get the error:
from https://github.com/ropensci/vcr/blob/42fad406bf43519ffa535ee2316082339fc3bbf8/R/examples.R#L61C3-L61C26
So some earlier escaping is needed.
But a remaining problem is that if no cassette is inserted,
vcr::eject_cassette()errors.In
local_cassette(), the ejecting function is called conditionally.vcr/R/use_cassette.R
Line 146 in 42fad40
Maybe
vcr::eject_cassette()should also have an earlyreturn()when vcr is off? Thoughts?