Running ‘test-all.R’ [5s/465s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > test_check("zoon")
  Loading required package: zoon
  Loading required package: raster
  Loading required package: sp
  ── 1. Error: Test errors are thrown (@testCombineRasters.R#6)  ─────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/R/NaiveRandomRaster.R'
  1: source(path) at testthat/testCombineRasters.R:6
  2: file(filename, "r", encoding = encoding)
  
  ── 2. Error: Combinations of projections and extents (@testCombineRasters.R#54) 
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/R/NaiveRandomRaster.R'
  1: source(path) at testthat/testCombineRasters.R:54
  2: file(filename, "r", encoding = encoding)
  
  ── 3. Error: Test in workflows (@testCombineRasters.R#94)  ─────────────────────
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: workflow(UKAnophelesPlumbeus, Chain(UKAir, NaiveRandomRaster), OneHundredBackground, 
         RandomForest, PrintMap) at testthat/testCombineRasters.R:94
  2: LapplyGetModule(occurrence.module, forceReproducible, e)
  3: lapply(modules, function(x) {
         GotModule <- GetModule(as.character(x$module), forceReproducible, environment)
         res <- c(x, func = GotModule, version = attr(GotModule, "version"))
         return(res)
     })
  4: FUN(X[[i]], ...)
  5: GetModule(as.character(x$module), forceReproducible, environment)
  6: parse(text = rawText)
  
  ── 4. Error: GetModule works (@testGetModule.R#23)  ────────────────────────────
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: expect_that(as.character(GetModule("NoProcess", FALSE)), equals("NoProcess")) at testthat/testGetModule.R:23
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label, arg = "object")
  5: eval_bare(get_expr(quo), get_env(quo))
  6: GetModule("NoProcess", FALSE)
  7: parse(text = rawText)
  
  ── 5. Error: GetModuleList renew (@testGetModuleList.R#6)  ─────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(renew = TRUE) at testthat/testGetModuleList.R:6
  2: readLines(con)
  
  ── 6. Error: GetModuleList no renew (@testGetModuleList.R#24)  ─────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(renew = FALSE) at testthat/testGetModuleList.R:24
  2: readLines(con)
  
  ── 7. Error: GetModuleList type occurrence (@testGetModuleList.R#42)  ──────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(type = "occurrence") at testthat/testGetModuleList.R:42
  2: readLines(con)
  
  ── 8. Error: GetModuleList type covariate (@testGetModuleList.R#52)  ───────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(type = "covariate") at testthat/testGetModuleList.R:52
  2: readLines(con)
  
  ── 9. Error: GetModuleList type process (@testGetModuleList.R#62)  ─────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(type = "process") at testthat/testGetModuleList.R:62
  2: readLines(con)
  
  ── 10. Error: GetModuleList type model (@testGetModuleList.R#72)  ──────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(type = "model") at testthat/testGetModuleList.R:72
  2: readLines(con)
  
  ── 11. Error: GetModuleList type ouput (@testGetModuleList.R#82)  ──────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: GetModuleList(type = "output") at testthat/testGetModuleList.R:82
  2: readLines(con)
  
  ── 12. Error: LapplyGetModule works correctly (@testLapplyGetModule.R#7)  ──────
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: LapplyGetModule(list(a, b), forceReproducible = FALSE) at testthat/testLapplyGetModule.R:7
  2: lapply(modules, function(x) {
         GotModule <- GetModule(as.character(x$module), forceReproducible, environment)
         res <- c(x, func = GotModule, version = attr(GotModule, "version"))
         return(res)
     })
  3: FUN(X[[i]], ...)
  4: GetModule(as.character(x$module), forceReproducible, environment)
  5: parse(text = rawText)
  
  ── 13. Error: LoadModule works (@testLoadModule.R#33)  ─────────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: expect_that(LoadModule("NoProcess"), equals("NoProcess")) at testthat/testLoadModule.R:33
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label, arg = "object")
  5: eval_bare(get_expr(quo), get_env(quo))
  6: LoadModule("NoProcess")
  7: GetModuleList()
  8: readLines(con)
  
  ── 14. Failure: ModuleHelp errors (@testModuleHelp.R#14)  ──────────────────────
  `ModuleHelp("NoProce1s")` threw an error with unexpected message.
  Expected match: "Can't find 'NoProce1s'. Did you mean"
  Actual message: "cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'"
  
  ── 15. Error: Help as text (@testModuleHelp.R#24)  ─────────────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: capture.output(ModuleHelp("NoProcess"), file = file.path(directory, "help_text.txt")) at testthat/testModuleHelp.R:24
  2: evalVis(expr)
  3: withVisible(eval(expr, pf))
  4: eval(expr, pf)
  5: eval(expr, pf)
  6: ModuleHelp("NoProcess")
  7: GetModuleList()
  8: readLines(con)
  
  ── 16. Error: Help as NULL (@testModuleHelp.R#39)  ─────────────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: capture.output(ModuleHelp("NoProcess"), file = file.path(directory, "help_null.txt")) at testthat/testModuleHelp.R:39
  2: evalVis(expr)
  3: withVisible(eval(expr, pf))
  4: eval(expr, pf)
  5: eval(expr, pf)
  6: ModuleHelp("NoProcess")
  7: GetModuleList()
  8: readLines(con)
  
  ── 17. Error: Help as html (@testModuleHelp.R#56)  ─────────────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: expect_warning(capture.output(ModuleHelp("NoProcess"), file = file.path(directory, 
         "help.html")), "^To display html help") at testthat/testModuleHelp.R:56
  2: quasi_capture(enquo(object), label, capture_warnings)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(.quo), get_env(.quo))
  6: capture.output(ModuleHelp("NoProcess"), file = file.path(directory, "help.html"))
  7: evalVis(expr)
  8: withVisible(eval(expr, pf))
  9: eval(expr, pf)
  10: eval(expr, pf)
  11: ModuleHelp("NoProcess")
  12: GetModuleList()
  13: readLines(con)
  
  ── 18. Error: Help as pdf (@testModuleHelp.R#85)  ──────────────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/man/SpOcc.Rd'
  1: expect_warning(capture.output(ModuleHelp("NoProcess"), file = file.path(directory, 
         "help.txt")), "^pdf help files") at testthat/testModuleHelp.R:85
  2: quasi_capture(enquo(object), label, capture_warnings)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(.quo), get_env(.quo))
  6: capture.output(ModuleHelp("NoProcess"), file = file.path(directory, "help.txt"))
  7: evalVis(expr)
  8: withVisible(eval(expr, pf))
  9: eval(expr, pf)
  10: eval(expr, pf)
  11: ModuleHelp("NoProcess")
  12: GetModuleList()
  13: readLines(con)
  
  ── 19. Error: Replicate workflow tests (@testReplicate.R#27)  ──────────────────
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: workflow(occurrence = Replicate(UKAnophelesPlumbeus, 3), covariate = UKAir, process = Background(n = 70), 
         model = LogisticRegression, output = SameTimePlaceMap) at testthat/testReplicate.R:27
  2: LapplyGetModule(occurrence.module, forceReproducible, e)
  3: lapply(modules, function(x) {
         GotModule <- GetModule(as.character(x$module), forceReproducible, environment)
         res <- c(x, func = GotModule, version = attr(GotModule, "version"))
         return(res)
     })
  4: FUN(X[[i]], ...)
  5: GetModule(as.character(x$module), forceReproducible, environment)
  6: parse(text = rawText)
  
  ── 20. Error: SortArgs works. (@testSortArgs.R#21)  ────────────────────────────
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: eval(parse(text = x)) at testthat/testSortArgs.R:21
  2: eval(parse(text = x))
  3: workflow(occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = OneHundredBackground, 
         model = LogisticRegression, output = PrintMap, forceReproducible = TRUE)
  4: LapplyGetModule(occurrence.module, forceReproducible, e)
  5: lapply(modules, function(x) {
         GotModule <- GetModule(as.character(x$module), forceReproducible, environment)
         res <- c(x, func = GotModule, version = attr(GotModule, "version"))
         return(res)
     })
  6: FUN(X[[i]], ...)
  7: GetModule(as.character(x$module), forceReproducible, environment)
  8: parse(text = rawText)
  
  ── 21. Error: Expected errors (@testTransformCRS.R#5)  ─────────────────────────
  cannot open the connection to 'https://raw.githubusercontent.com/zoonproject/modules/master/R/NaiveRandomPresence.R'
  1: source(paste0(basepath, "NaiveRandomPresence.R")) at testthat/testTransformCRS.R:5
  2: file(filename, "r", encoding = encoding)
  
  ── 22. Error: occurrence data is handled as expected when CRSs vary (@testTransf
  could not find function "NaiveRandomPresence"
  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
     }, "could not find function \"NaiveRandomPresence\"", base::quote(NaiveRandomPresence(extent = c(0, 
         1e+06, 0, 1e+06), seed = 123))) at testthat/testTransformCRS.R:55
  2: eval(code, test_env)
  
  ── 23. Error: Handles NA values and blanks (@testTransformCRS.R#183)  ──────────
  could not find function "NaiveRandomPresence"
  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
     }, "could not find function \"NaiveRandomPresence\"", base::quote(NaiveRandomPresence(extent = c(0, 
         1e+06, 0, 1e+06), seed = 123, projection = "+init=epsg:27700"))) at testthat/testTransformCRS.R:183
  2: eval(code, test_env)
  
  ── 24. Error: WriteWorkflowMetadata works. (@testWriteWorkflowMetadata.R#4)  ───
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: workflow(occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = Background(n = 70), 
         model = LogisticRegression, output = SameTimePlaceMap, forceReproducible = TRUE) at testthat/testWriteWorkflowMetadata.R:4
  2: LapplyGetModule(occurrence.module, forceReproducible, e)
  3: lapply(modules, function(x) {
         GotModule <- GetModule(as.character(x$module), forceReproducible, environment)
         res <- c(x, func = GotModule, version = attr(GotModule, "version"))
         return(res)
     })
  4: FUN(X[[i]], ...)
  5: GetModule(as.character(x$module), forceReproducible, environment)
  6: parse(text = rawText)
  
  ── 25. Error: Check returns list with all the names (@testZoonCitation.R#13)  ──
  URL for module does not exist: https://raw.githubusercontent.com/zoonproject/modules/master/R/LogisticRegression.R
  1: ZoonCitation("LogisticRegression") at testthat/testZoonCitation.R:13
  2: stop("URL for module does not exist: ", ModuleURL)
  
  ── 26. Error: All accessor functions return objects of the right length and type
  <text>:1:15: unexpected symbol
  1: 500: Internal Server
                    ^
  1: workflow(occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = Background(n = 70), 
         model = LogisticRegression, output = PrintMap) at testthat/testaccessors.R:10
  2: LapplyGetModule(occurrence.module, forceReproducible, e)
  3: lapply(modules, function(x) {
         GotModule <- GetModule(as.character(x$module), forceReproducible, environment)
         res <- c(x, func = GotModule, version = attr(GotModule, "version"))
         return(res)
     })
  4: FUN(X[[i]], ...)
  5: GetModule(as.character(x$module), forceReproducible, environment)
  6: parse(text = rawText)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 82 SKIPPED: 30 WARNINGS: 15 FAILED: 26
  1. Error: Test errors are thrown (@testCombineRasters.R#6) 
  2. Error: Combinations of projections and extents (@testCombineRasters.R#54) 
  3. Error: Test in workflows (@testCombineRasters.R#94) 
  4. Error: GetModule works (@testGetModule.R#23) 
  5. Error: GetModuleList renew (@testGetModuleList.R#6) 
  6. Error: GetModuleList no renew (@testGetModuleList.R#24) 
  7. Error: GetModuleList type occurrence (@testGetModuleList.R#42) 
  8. Error: GetModuleList type covariate (@testGetModuleList.R#52) 
  9. Error: GetModuleList type process (@testGetModuleList.R#62) 
  1. ...
  
  Error: testthat unit tests failed
  In addition: There were 12 warnings (use warnings() to see them)
  Execution halted