Closed maelle closed 4 years ago
Merging #93 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #93 +/- ##
=======================================
Coverage 79.16% 79.16%
=======================================
Files 6 6
Lines 912 912
=======================================
Hits 722 722
Misses 190 190
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 35ba5da...ff04b6c. Read the comment docs.
Thanks! I'm going to leave this PR here as a reference and will hopefully have some time to take a look in the near future. If I get things figured out, perhaps for that blog post, I could talk a bit about using both/either vcr
and mockery
to solve my internet connection issues!
perhaps for that blog post, I could talk a bit about using both/either vcr and mockery to solve my internet connection issues!
No pressure :angel: but that sounds like an awesome blog post topic :heart_eyes_cat:
One last thing that might be useful to you since you want to check real API things regularly (which I learnt in your comm call talk :wink:): https://docs.ropensci.org/vcr/reference/lightswitch.html (see e.g. a config file where vcr is turned off for one build).
Oh that's a great option! Especially being able to integrate it into Travis CI and AppVeyor!
I switched all the tests to vcr and CRAN had no problem. I did have to think hard sometimes, to make sure that the test fixtures remained small. But everything worked out well!
This is so cool!!
Do you mean making the test cases small or editing the fixtures by hand?
Definitely not editing by hand! I meant re-using examples for different tests and strategically picking dates (i.e. daily data in ECCC is downloaded by month, so instead of a date range of 2018-09-01 to 2018-10-01, which downloads two months, I would change that to 2018-09-31, which downloads one mont, unless the point was to test downloading multiple months.)
thank you! :pray:
:wave: @steffilazerte! Here's my shameless vcr promotion effort! :wink:
I ran
vcr::use_vcr()
and then created an example test based off the first part of an existing test.