Running ‘test-all.R’ [26s/72s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > 
  > library(testthat)
  > 
  > # important to replicate errors!
  > rclimateca::clear_cache()
  > 
  > test_check("rclimateca")
  Loading required package: rclimateca
  ── 1. Error: geocode searching works (@test-climate_locations.R#199)  ──────────
  $ operator is invalid for atomic vectors
  1: expect_equal(ec_climate_geosearch_locations("wolfville ns") %>% rlang::set_attrs(NULL) %>% 
         sort(), ec_climate_search_locations(c(-64.36449, 45.09123)) %>% rlang::set_attrs(NULL) %>% 
         sort()) at testthat/test-climate_locations.R:199
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ec_climate_geosearch_locations("wolfville ns") %>% rlang::set_attrs(NULL) %>% sort()
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: ec_climate_geosearch_locations("wolfville ns")
  8: suppressMessages(prettymapr::geocode(query))
  9: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  10: prettymapr::geocode(query)
  ...
  15: (function (i) 
     {
         piece <- pieces[[i]]
         if (.inform) {
             res <- try(.fun(piece, ...))
             if (inherits(res, "try-error")) {
                 piece <- paste(utils::capture.output(print(piece)), collapse = "\n")
                 stop("with piece ", i, ": \n", piece, call. = FALSE)
             }
         }
         else {
             res <- .fun(piece, ...)
         }
         progress$step()
         res
     })(1L)
  16: .fun(piece, ...)
  17: geocoder_partial(row$query)
  18: geocoder(loc, output = output, limit = limit, key = key, quiet = quiet, cache = cache, 
         ...)
  19: plyr::adply(df, 1, function(row) {
         result <- data[[row$rank]]
         boundingbox <- result$boundingbox
         if (length(boundingbox) != 4) {
             warning("Unexpected bounding box type for location ", location)
             boundingbox <- rep(NA_real_, 4)
         }
         fields <- list(address = result$display_name, lon = as.numeric(result$lon), lat = as.numeric(result$lat), 
             bbox_n = as.numeric(boundingbox[2]), bbox_e = as.numeric(boundingbox[4]), 
             bbox_s = as.numeric(boundingbox[1]), bbox_w = as.numeric(boundingbox[3]), 
             id = result$place_id)
         fields <- fields[!vapply(fields, function(x) length(x) == 0, logical(1))]
         data.frame(fields, stringsAsFactors = FALSE)
     })
  20: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  21: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  22: loop_apply(n, do.ply)
  23: (function (i) 
     {
         piece <- pieces[[i]]
         if (.inform) {
             res <- try(.fun(piece, ...))
             if (inherits(res, "try-error")) {
                 piece <- paste(utils::capture.output(print(piece)), collapse = "\n")
                 stop("with piece ", i, ": \n", piece, call. = FALSE)
             }
         }
         else {
             res <- .fun(piece, ...)
         }
         progress$step()
         res
     })(1L)
  24: .fun(piece, ...)
  
  ── 2. Error: printing of search results gives the correct information (@test-cli
  $ operator is invalid for atomic vectors
  1: expect_output(print(ec_climate_geosearch_locations("wolfville ns")), "Search results for") at testthat/test-climate_locations.R:212
  2: quasi_capture(enquo(object), capture_output, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: capture_output_lines(code, print, width = width)
  5: eval_with_output(code, print = print, width = width)
  6: withr::with_output_sink(temp, withVisible(code))
  7: force(code)
  8: withVisible(code)
  9: eval_bare(get_expr(quo), get_env(quo))
  10: print(ec_climate_geosearch_locations("wolfville ns"))
  ...
  19: (function (i) 
     {
         piece <- pieces[[i]]
         if (.inform) {
             res <- try(.fun(piece, ...))
             if (inherits(res, "try-error")) {
                 piece <- paste(utils::capture.output(print(piece)), collapse = "\n")
                 stop("with piece ", i, ": \n", piece, call. = FALSE)
             }
         }
         else {
             res <- .fun(piece, ...)
         }
         progress$step()
         res
     })(1L)
  20: .fun(piece, ...)
  21: geocoder_partial(row$query)
  22: geocoder(loc, output = output, limit = limit, key = key, quiet = quiet, cache = cache, 
         ...)
  23: plyr::adply(df, 1, function(row) {
         result <- data[[row$rank]]
         boundingbox <- result$boundingbox
         if (length(boundingbox) != 4) {
             warning("Unexpected bounding box type for location ", location)
             boundingbox <- rep(NA_real_, 4)
         }
         fields <- list(address = result$display_name, lon = as.numeric(result$lon), lat = as.numeric(result$lat), 
             bbox_n = as.numeric(boundingbox[2]), bbox_e = as.numeric(boundingbox[4]), 
             bbox_s = as.numeric(boundingbox[1]), bbox_w = as.numeric(boundingbox[3]), 
             id = result$place_id)
         fields <- fields[!vapply(fields, function(x) length(x) == 0, logical(1))]
         data.frame(fields, stringsAsFactors = FALSE)
     })
  24: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  25: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  26: loop_apply(n, do.ply)
  27: (function (i) 
     {
         piece <- pieces[[i]]
         if (.inform) {
             res <- try(.fun(piece, ...))
             if (inherits(res, "try-error")) {
                 piece <- paste(utils::capture.output(print(piece)), collapse = "\n")
                 stop("with piece ", i, ": \n", piece, call. = FALSE)
             }
         }
         else {
             res <- .fun(piece, ...)
         }
         progress$step()
         res
     })(1L)
  28: .fun(piece, ...)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======                                                                |   8%
    |                                                                            
    |============                                                          |  17%
    |                                                                            
    |==================                                                    |  25%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |=============================                                         |  42%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |=========================================                             |  58%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |====================================================                  |  75%
    |                                                                            
    |==========================================================            |  83%
    |                                                                            
    |================================================================      |  92%
    |                                                                            
    |======================================================================| 100%
  ── 3. Error: deprecated functions all have a warning (@test-deprecated_functions
  $ operator is invalid for atomic vectors
  1: expect_message(getClimateSites("Wolfville NS"), "is deprecated and will be removed in future versions") at testthat/test-deprecated_functions.R:111
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: getClimateSites("Wolfville NS")
  7: suppressMessages(prettymapr::geocode(location))
  8: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  9: prettymapr::geocode(location)
  10: plyr::adply(df, 1, function(row) geocoder_partial(row$query), .progress = progress)
  ...
  14: (function (i) 
     {
         piece <- pieces[[i]]
         if (.inform) {
             res <- try(.fun(piece, ...))
             if (inherits(res, "try-error")) {
                 piece <- paste(utils::capture.output(print(piece)), collapse = "\n")
                 stop("with piece ", i, ": \n", piece, call. = FALSE)
             }
         }
         else {
             res <- .fun(piece, ...)
         }
         progress$step()
         res
     })(1L)
  15: .fun(piece, ...)
  16: geocoder_partial(row$query)
  17: geocoder(loc, output = output, limit = limit, key = key, quiet = quiet, cache = cache, 
         ...)
  18: plyr::adply(df, 1, function(row) {
         result <- data[[row$rank]]
         boundingbox <- result$boundingbox
         if (length(boundingbox) != 4) {
             warning("Unexpected bounding box type for location ", location)
             boundingbox <- rep(NA_real_, 4)
         }
         fields <- list(address = result$display_name, lon = as.numeric(result$lon), lat = as.numeric(result$lat), 
             bbox_n = as.numeric(boundingbox[2]), bbox_e = as.numeric(boundingbox[4]), 
             bbox_s = as.numeric(boundingbox[1]), bbox_w = as.numeric(boundingbox[3]), 
             id = result$place_id)
         fields <- fields[!vapply(fields, function(x) length(x) == 0, logical(1))]
         data.frame(fields, stringsAsFactors = FALSE)
     })
  19: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  20: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  21: loop_apply(n, do.ply)
  22: (function (i) 
     {
         piece <- pieces[[i]]
         if (.inform) {
             res <- try(.fun(piece, ...))
             if (inherits(res, "try-error")) {
                 piece <- paste(utils::capture.output(print(piece)), collapse = "\n")
                 stop("with piece ", i, ": \n", piece, call. = FALSE)
             }
         }
         else {
             res <- .fun(piece, ...)
         }
         progress$step()
         res
     })(1L)
  23: .fun(piece, ...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 172 SKIPPED: 0 FAILED: 3
  1. Error: geocode searching works (@test-climate_locations.R#199) 
  2. Error: printing of search results gives the correct information (@test-climate_locations.R#212) 
  3. Error: deprecated functions all have a warning (@test-deprecated_functions.R#111) 
  
  Error: testthat unit tests failed
  Execution halted