How do I run an individual testthat test in R?

Viewed 1306

I want to use testthat for integration tests in an R package being installed into a Jupyter notebook environment. Practically, that means I don't want the tests run when the package is installed, but rather manually later, when the system is running.

I think that means I shouldn't put tests into a tests/testthat directory, but rather the R directory.

So, I still want all the expect_ functions, but how do I run a test? I'm not sure if I can specify a file or directory, because it will be after the package is installed, and I don't know what the current working directory or install directory will be.

1 Answers
Related