nealrichardson / httptest

A Test Environment for HTTP Requests in R
https://enpiar.com/r/httptest/
Other
79 stars 10 forks source link

Interaction with memoise #71

Open maelle opened 2 years ago

maelle commented 2 years ago

Just a note for info (should httptest get discussions?)

I had a case with tests passing on Ubuntu and failing on macOS and Windows. I first thought the mock file was not found despite its being there but it turns out it was not there.

I'm not even sure what the OS problem was but in conclusion one should pay attention when capturing requests that are memoised. :sweat_smile: Maybe too niche for any doc though?

nealrichardson commented 2 years ago

Yeah if you're caching in some other layer, that's going to affect what requests are made, and thus how you test.

asadow commented 1 month ago

More in line with a discussion, are you using memoise inside a package as opposed to leaving that option to the user? Why are you testing a memoised request?