opencage icon indicating copy to clipboard operation
opencage copied to clipboard

add tests using vcr and webmockr

Open maelle opened this issue 7 years ago • 5 comments

a.k.a using this package as a playground to learn about these packages.

maelle avatar Feb 15 '18 09:02 maelle

started at https://github.com/dpprdan/opencage/tree/feat_vcr

  • [ ] oc_get
  • [ ] oc_check_status
  • [ ] oc_process

dpprdan avatar May 08 '19 21:05 dpprdan

To use these tests on CRAN as well, we have to wait for a new CRAN release of memoise, so memoise works well with ratelimitr in vcr tests. There is https://github.com/r-lib/memoise/issues/107 to ask for a CRAN release:

dpprdan avatar Nov 20 '20 21:11 dpprdan

So we should skip those tests on CRAN , at least I don't think we want to wait?

maelle avatar Nov 21 '20 05:11 maelle

Maybe we will have to look into the bug more closely. If vcr only works reliably with the fixed memoise version, both in recording and playback, then we can only use it outside of CRAN. And we would have to make sure, that we always use the dev-version of memoise. That sounds doable, but also like something to mess up easily and I don't know whether it is worth the hassle. (Alternatively, wouldn't it be easier to somehow urge Jim to release a new memoise version?)

Maybe it is possible, that we need the memoise fix only for recording? That would make things a bit easier and it would also be possible to use the tests on CRAN. It still sounds fragile, though.

Postpone this to after v0.2 in any case?!

dpprdan avatar Nov 21 '20 09:11 dpprdan

yeah maybe we can ping him again in the issue, just in case it is easy to release a version.

And yes reg postponing!

maelle avatar Nov 21 '20 11:11 maelle