search for: testthat

Displaying 20 results from an estimated 113 matches for "testthat".

2017 Sep 17
2
R-devel r73293 and the testthat package
Hello, Windows R-devel no longer lets me use testthat even though the CRAN checks are pretty much clean. I have copied my session output below. Will R Under development (unstable) (2017-09-16 r73293) -- "Unsuffered Consequences" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is...
2015 Feb 08
2
Testthat and global environments in R packages on CRAN
Hi! Im currently developing an R package to automatically give students feedback on programming assignments in R. I use the testthat package as an engine for the unit testing and do a wrapper to make the automatic marking easy for the students. One function (called mark_my_file() ) will mark the students lab file using testthat tests and a new (simple) reporter. The problem is that I need to do the marking of the lab with an em...
2015 Feb 08
1
Testthat and global environments in R packages on CRAN
Hi! The problem is that the test environment inherits from the global environment. See https://github.com/hadley/testthat/blob/master/R/test-files.r The students labs are simply an R script file. Say that they have an assignment to calculate sqrt(2) and store it in variable a. In the same session they should be able to test the script file when they are done (using a function mark_my_file() in the package). This func...
2023 Jan 10
1
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
...aluable for third-party developers who >>> have to mass-test packages (one of which could be rlibkriging) in >>> parallel. >>> >>>> - is there any reason that could explain that fedora-*-devel is so >>>> slow for this package or compilation of Rcpp/testthat ? >>> >>> Compilation time is definitely not the reason. Something in tests/* >>> actually runs for 30 minutes by itself. >>> >>>> - is there any chance that I can get a deeper log of what happened ? >>> >>> If you split your tests i...
2023 Jan 11
2
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
Thank you all, for these advices. So I try to fix OMP_THREADS, cleanup tests, and display explicitly what test is running by moving in tests/ instead of tests/testthat/... Next step should be to investigate blocking test using a reporter (maybe "list"). For now, waiting for CRAN results... Yann -----Message d'origine----- De?: Duncan Murdoch <murdoch.duncan at gmail.com> Envoy??: mercredi 11 janvier 2023 00:36 ??: Sebastian Meyer <seb.me...
2015 May 04
2
Print output during long tests?
I am the author of R package animint which uses testthat for unit tests. This means that there is a single test file (animint/tests/testthat.R) and during R CMD check we will see the following output * checking tests ... Running ?testthat.R? I run these tests on Travis, which has a policy that if no output is received after 10 minutes, it will kill th...
2023 Jan 10
1
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
...This is especially valuable for third-party developers who >> have to mass-test packages (one of which could be rlibkriging) in >> parallel. >> >>> - is there any reason that could explain that fedora-*-devel is so >>> slow for this package or compilation of Rcpp/testthat ? >> >> Compilation time is definitely not the reason. Something in tests/* >> actually runs for 30 minutes by itself. >> >>> - is there any chance that I can get a deeper log of what happened ? >> >> If you split your tests into separate files under tes...
2010 Nov 15
2
Trying to understand the search path and namespaces
Hi all, I'm trying to understand how the search path and namespaces interact. For example, take the devtools package which suggests the testthat package. Here's what the search path looks like after I load each of those packages: > library(devtools) > search() [1] ".GlobalEnv" "package:devtools" "package:stats" [4] "package:graphics" "package:grDevices" "package:u...
2015 Feb 08
0
Testthat and global environments in R packages on CRAN
On 08/02/2015 8:22 AM, M?ns Magnusson wrote: > Hi! > > Im currently developing an R package to automatically give students > feedback on programming assignments in R. I use the testthat package as an > engine for the unit testing and do a wrapper to make the automatic marking > easy for the students. > > One function (called mark_my_file() ) will mark the students lab file using > testthat tests and a new (simple) reporter. The problem is that I need to > do the...
2011 Dec 30
0
testthat 0.6
# testthat Testing your code is normally painful and boring. `testthat` tries to make testing as fun as possible, so that you get a visceral satisfaction from writing tests. Testing should be fun, not a drag, so you do it all the time. To make that happen, `testthat`: * Provides functions that make it easy to...
2011 Dec 30
0
testthat 0.6
# testthat Testing your code is normally painful and boring. `testthat` tries to make testing as fun as possible, so that you get a visceral satisfaction from writing tests. Testing should be fun, not a drag, so you do it all the time. To make that happen, `testthat`: * Provides functions that make it easy to...
2010 Sep 01
0
testthat: version 0.3
# testthat Testing your code is normally painful and boring. `testthat` tries to make testing as fun as possible, so that you get a visceral satisfaction from writing tests. Testing should be fun, not a drag, so you do it all the time. To make that happen, `testthat`: * Provides functions that make it easy...
2010 Sep 01
0
testthat: version 0.3
# testthat Testing your code is normally painful and boring. `testthat` tries to make testing as fun as possible, so that you get a visceral satisfaction from writing tests. Testing should be fun, not a drag, so you do it all the time. To make that happen, `testthat`: * Provides functions that make it easy...
2019 Aug 12
1
ALTREP package interaction with testthat
Hi I found a weird problem in testthat while working with an ALTREP package. The package name is AltWrapper. My ALTREP serialize function is called even when I'm trying to serialize a non-ALTREP object. Here is an example ``` context("altrep") length_func<-function(x){ return(length(x)) } setAltClass(classN...
2015 Apr 19
4
running unit tests on the stringr package
I am trying to learn how to run the unit tests in the stringr package and have the following questions. 1) The r-cran-stringr package does not suggest/depend on the r-cran-testthat package . Would it make sense to add such a thing since after all the tests in /usr/lib/R/site-library/stringr/tests rely on testthat package? 2) I am getting the following error when trying to run the unit tests % R R version 3.1.1 (2014-07-10) -- "Sock it to Me" ... > library('...
2023 Jan 11
2
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
On 11/01/2023 12:35 p.m., RICHET Yann wrote: > Thank you all, for these advices. > > So I try to fix OMP_THREADS, cleanup tests, and display explicitly what test is running by moving in tests/ instead of tests/testthat/... > Next step should be to investigate blocking test using a reporter (maybe "list"). > For now, waiting for CRAN results... I think Sebastian or my suggestion is easier than redoing all of your tests. They are each one line changes. Duncan Murdoch > > Yann > >...
2023 Jan 10
1
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
...and > examples. This is especially valuable for third-party developers who > have to mass-test packages (one of which could be rlibkriging) in > parallel. > >> - is there any reason that could explain that fedora-*-devel is so >> slow for this package or compilation of Rcpp/testthat ? > > Compilation time is definitely not the reason. Something in tests/* > actually runs for 30 minutes by itself. > >> - is there any chance that I can get a deeper log of what happened ? > > If you split your tests into separate files under tests/*.R instead of > us...
2018 May 30
1
CRAN checks give errors when no tests are included
...el (see link below): Someone sent a package to CRAN with a few problems. There's more things wrong with the submission, but one thing that really caught my eye was the following error: Warning message: running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD BATCH --vanilla "testthat.R" "testthat.Rout"' had status 1 ERROR Running the tests in 'tests/testthat.R' failed. Last 13 lines of output: Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()&...
2023 Jan 10
1
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
...up to two threads in tests and examples. This is especially valuable for third-party developers who have to mass-test packages (one of which could be rlibkriging) in parallel. > - is there any reason that could explain that fedora-*-devel is so > slow for this package or compilation of Rcpp/testthat ? Compilation time is definitely not the reason. Something in tests/* actually runs for 30 minutes by itself. > - is there any chance that I can get a deeper log of what happened ? If you split your tests into separate files under tests/*.R instead of using a single tests/testthat.R calling t...
2015 Apr 20
0
running unit tests on the stringr package
...hould use test_package() and not test_dir(), as the latter does not load unexported functions of the package (such as check_string()) that may occur in the tests. For packaging of r-cran-stringr, it is probably most efficient to file a bug report there because of the missing Suggests for r-cran-testthat. Kind regards, Johannes Am Sonntag, 19. April 2015, 17:58:53 schrieb kamaraju kusumanchi: > I am trying to learn how to run the unit tests in the stringr package > and have the following questions. > > 1) The r-cran-stringr package does not suggest/depend on the > r-cran-testtha...