Closed ewallace closed 2 years ago
Yes, devtools::check() does not run the tests. However, the continuous integration on github does already successfully run the tests. The difference is that I use testthat::test_package() not devtools::test() which run slightly differently. testthat::test_package() first finds the testthat.R file where all the libraries are loaded before running the tests. devtools::test() skips this step on just runs the tests without loading the libraries. It's a relatively minor point but being explicit in the tests themselves solves the problem.
I am happy that this is solved by being explicit in the tests so that we do not need to change the tests. Closing. Thank you @DimmestP.
From https://github.com/ropensci/software-review/issues/470#issuecomment-1100386014
@jooolia pointed out that
devtools::test()
was failing. I had not until that point realised thatdevtools::check()
did not run the tests.Could we add
devtools::test()
to the continuous integration on github, to make sure that doesn't happen again?