On Fri, Sep 7, 2018 at 2:53 PM Iñaki Ucar <iu...@fedoraproject.org> wrote: [...] > For the record, this is what the testthat paper in the R Journal says: > > "[...] I recommend storing your tests in inst/tests/ (so users also > have access to them), then including one file in tests/ that runs all > of the package tests. The test_package(package_name) function makes > this easy. [...] This setup has the additional advantage that users > can make sure your package works correctly in their run-time > environment."
And while deprecated, this method still works just fine, and will continue to work. You can just put your tests in inst/tests/testthat and put withr::with_dir( system.file(package = <package>, "tests"), testthat::test_check(<package>)) in tests/testthat.R. And of course you can run the tests of the installed package with the same piece of code. Gabor > Iñaki > > > > > Dirk > > > > -- > > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > > ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel