posts/2021-11-23-getting-started-with-unit-testing-in-r/ #51
Replies: 1 comment 1 reply
-
Thanks for this great intro. One function I'm testing is dependent on data from previous functions, so I have saved those outputs as .rda files into tests/testthat/testdata. Running the test manually, I can load the data prior to running test_that with load(test_path("testdata","data.rda")), and the test passes. However, when running automatically the test fails because "data" does not exist in the environment. My function calls the data internally, not as an argument when calling the function. Do you have any advice? Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
posts/2021-11-23-getting-started-with-unit-testing-in-r/
Automating the dev work you are probably already doing
https://www.pipinghotdata.com/posts/2021-11-23-getting-started-with-unit-testing-in-r/
Beta Was this translation helpful? Give feedback.
All reactions