-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practice for vcr-enabled tests on CRAN #102
Comments
I guess one (obvious?) thing to keep in mind would be to create the cassettes by running e.g. |
Yes, it is possible to run tests on CRAN that use cassettes on disk. I think at first when vcr was just on CRAN I was skipping tests that used vcr until I was sure it worked on CRAN checks, but it should be fine now to run tests that use vcr on CRAN I don't know the scope of what's allowed for running tests on CRAN - but it has worked to have them in One thing to note is that if you have your cassettes in wrt using |
Thanks! We're all set then, it seems. 🎉
The same applies to Do you want to add "vcr-enabled tests on CRAN" to the docs/README/HTTP-testing-book? |
right, same-ish for .Rbuildignore
sure, what exactly are you thinking? e.g., how can this section https://github.com/ropensci/vcr#vcr-for-tests be improved |
and about check vs test
see new section https://ropenscilabs.github.io/http-testing-book/vcr-intro.html#vcr-enabled-testing in the book |
I've started using {vcr} for the tests in {opencage}, but I am unsure, what the best practices are regarding running the tests on CRAN (or not).
I have seen that some of the tests that use vcr in other packages
skip_on_cran()
, but not all, e.g. https://github.com/ropensci/worrms/blob/master/tests/testthat/test-wm_children.RSo it seems to be possible to run these tests on CRAN? Is there anything one has to keep in mind? E.g. where should the cassettes ideally go (for {opencage} I stored them in
tests/vcr_cassettes
)?The text was updated successfully, but these errors were encountered: