On 7 September 2018 at 10:38, Hadley Wickham wrote: | On Fri, Sep 7, 2018 at 9:13 AM Iñaki Ucar <iu...@fedoraproject.org> wrote: | > El vie., 7 sept. 2018 a las 16:03, Ralf Stubner | > (<ralf.stub...@daqana.com>) escribió: | > > On 07.09.2018 15:52, Iñaki Ucar wrote: | > > Tests in 'inst/test' got deprecated later on: | > > | > > https://github.com/r-lib/testthat/commit/0a7d27bb9ea545be7da1a10e511962928d888302 | > | > Yeap, and I was pointing out the *old* (2011) practice and | > recommendation. The reason why this evolved and changed, that I don't | > know. | | Because CRAN specifically asked me to put testthat tests in tests/ | (R's standard testing directory), rather that somewhere non-standard.
But maybe that was in response to you having moved from inst/ to another location, possibly a new top-level directory? I have a hard time believing that CRAN considered a directory inside inst/ to be non-standard. Current WRE where talking about tests/ only refers to the basic test facility and neither RUnit nor testthat are mentioned (as other CRAN package rarely get endorsed by WRE). I quote it in full below. Dirk Two-paragraph quote from Section 1.1.5 "Package subdirectories" follows. Subdirectory 'tests' is for additional package-specific test code, similar to the specific tests that come with the R distribution. Test code can either be provided directly in a '.R' (or '.r' as from R 3.4.0) file, or _via_ a '.Rin' file containing code which in turn creates the corresponding '.R' file (e.g., by collecting all function objects in the package and then calling them with the strangest arguments). The results of running a '.R' file are written to a '.Rout' file. If there is a corresponding(10) '.Rout.save' file, these two are compared, with differences being reported but not causing an error. The directory 'tests' is copied to the check area, and the tests are run with the copy as the working directory and with 'R_LIBS' set to ensure that the copy of the package installed during testing will be found by 'library(PKG_NAME)'. Note that the package-specific tests are run in a vanilla R session without setting the random-number seed, so tests which use random numbers will need to set the seed to obtain reproducible results (and it can be helpful to do so in all cases, to avoid occasional failures when tests are run). If directory 'tests' has a subdirectory 'Examples' containing a file 'PKG-Ex.Rout.save', this is compared to the output file for running the examples when the latter are checked. Reference output should be produced without having the '--timings' option set (and note that '--as-cran' sets it). -- 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