ropensci / ruODK

ruODK: An R Client for the ODK Central API
https://docs.ropensci.org/ruODK/
GNU General Public License v3.0
42 stars 13 forks source link

Test fails on unused argument to tempdir(check=TRUE) #42

Closed florianm closed 4 years ago

florianm commented 4 years ago

Problem

Reproducible example

Reported at https://github.com/ropensci/software-review/issues/335#issuecomment-542019403 by @jmt2080ad

test-attachment_get.R:80: error: get_one_attachment handles repeat
download and NA filenames
unused argument (check = TRUE)
1: .handleSimpleError(function (e) 
   {
       handled <<- TRUE
       test_error <<- e
       options(expressions = expressions_opt_new)
       on.exit(options(expressions = expressions_opt), add = TRUE)
       e$expectation_calls <- frame_calls(11, 2)
       test_error <<- e
       register_expectation(e)
       e$handled <- TRUE
       test_error <<- e
   }, "unused argument (check = TRUE)", quote(tempdir(check = TRUE)))
   at /home/....../test-attachment_get.R:80
Session Info ```{r} # utils::sessionInfo() ```
florianm commented 4 years ago

I can't reproduce the error on my end. tempdir(check=FALSE) is the default shown in the help of tempdir(), check=TRUE should simply check and re-create the tempdir if required.

@jmt2080ad can you reproduce this with the latest dev version of ruODK?

florianm commented 4 years ago

Also, what's your sessionInfo? This could be an issue with R < 3.5 as per https://github.com/mkearney/pkgverse/issues/3

florianm commented 4 years ago

Current status:

CI tests are passing, as ruODK is tested against R oldrel (3.5 at the time of writing) and newer. @jmt2080ad would anything speak against bumping R requirements to R>=3.5?