Running ‘test-all.R’ [5s/22s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > 
  > library(testthat)
  > 
  > test_check("prettymapr")
  Loading required package: prettymapr
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~1 s remaining  
  |==========================                          | 50% ~1 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 1 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  1. Error: invalid pickpoint API key results in correct error message (@test_geocode.R#90) 
  $ operator is invalid for atomic vectors
  1: geocode("wolfville ns", source = "pickpoint", key = "notavalidkey") at testthat/test_geocode.R:90
  2: plyr::adply(df, 1, function(row) geocoder_partial(row$query), .progress = progress)
  3: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  4: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  5: loop_apply(n, do.ply)
  6: (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)
  7: .fun(piece, ...)
  8: geocoder_partial(row$query)
  9: geocoder(loc, output = output, limit = limit, key = key, quiet = quiet, cache = cache, 
         ...)
  10: 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)
     })
  11: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  12: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  13: loop_apply(n, do.ply)
  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, ...)
  
  2. Error: non 200 status codes throw warning when quiet = FALSE (@test_geocode.R#125) 
  $ operator is invalid for atomic vectors
  1: expect_warning(geocode("something", key = "not a key", quiet = FALSE)) at testthat/test_geocode.R:125
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: geocode("something", key = "not a key", quiet = FALSE)
  5: plyr::adply(df, 1, function(row) geocoder_partial(row$query), .progress = progress)
  6: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  7: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  8: loop_apply(n, do.ply)
  9: (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)
  10: .fun(piece, ...)
  11: geocoder_partial(row$query)
  12: geocoder(loc, output = output, limit = limit, key = key, quiet = quiet, cache = cache, 
         ...)
  13: 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)
     })
  14: ldply(.data = pieces, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts, .id = .id)
  15: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  16: loop_apply(n, do.ply)
  17: (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)
  18: .fun(piece, ...)
  
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  
  |                                                    |  0%                      
  |========                                            |16.66667% ~0 s remaining  
  |=================                                   |33.33333% ~0 s remaining  
  |==========================                          | 50% ~0 s remaining       
  |==================================                  |66.66667% ~0 s remaining  
  |===========================================         |83.33333% ~0 s remaining  
  |====================================================|100% ~0 s remaining       
  |====================================================|100%                      Completed after 0 s 
  3. Error: rest query caches results (@test_restquery.R#7) ----------------------
  Unable to connect to https://www.goodreads.com/book/title?key=HSkIMuOGlxFIOmfBCGFVA&title=catch-22: 
    Timeout was reached: Connection timed out after 10001 milliseconds
  1: expect_message(restquery("https://www.goodreads.com/book/title", key = "HSkIMuOGlxFIOmfBCGFVA", 
         title = "catch-22", .cache = "prettymapr.cache"), "Retrieving information from") at testthat/test_restquery.R:7
  2: capture_messages(object)
  3: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  4: restquery("https://www.goodreads.com/book/title", key = "HSkIMuOGlxFIOmfBCGFVA", 
         title = "catch-22", .cache = "prettymapr.cache")
  5: stop("Unable to connect to ", url_string, ": ", as.character(connect))
  
  testthat results ================================================================
  OK: 109 SKIPPED: 0 FAILED: 3
  1. Error: invalid pickpoint API key results in correct error message (@test_geocode.R#90) 
  2. Error: non 200 status codes throw warning when quiet = FALSE (@test_geocode.R#125) 
  3. Error: rest query caches results (@test_restquery.R#7) 
  
  Error: testthat unit tests failed
  Execution halted