Running ‘testthat.R’ [13s/175s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bomrang)
  
  Attaching package: 'bomrang'
  
  The following object is masked from 'package:stats':
  
      filter
  
  The following object is masked from 'package:graphics':
  
      plot
  
  > 
  > test_check("bomrang")
  ── 1. Error: Error handling (@test-get_current_weather.R#7)  ───────────────────
  
  A station was matched.  However, a corresponding JSON file was not found at bom.gov.au.
  1: expect_warning(get_current_weather("Melbourne"), regexp = "Multiple stations match station_name.") at testthat/test-get_current_weather.R:7
  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: get_current_weather("Melbourne")
  7: tryCatch({
         observations.json <- jsonlite::fromJSON(txt = json_url)
     }, error = function(e) {
         e$message <- paste("\nA station was matched. ", "However, a corresponding JSON file was not found at", 
             "bom.gov.au.\n")
         e$call <- NULL
         stop(e)
     })
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
  ── 2. Error: Error handling (@test-get_historical.R#11)  ───────────────────────
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_warning(get_historical(stationid = "023000", latlon = c(1, 2)), regexp = "Only one.*stationid.*latlon") at testthat/test-get_historical.R:11
  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: get_historical(stationid = "023000", latlon = c(1, 2))
  7: .get_ncc()
  8: readr::read_table(weather[i], skip = 4, col_names = c("site", "name", "lat", "lon", 
         "start_month", "start_year", "end_month", "end_year", "years", "percent", "AWS"), 
         col_types = c(site = readr::col_integer(), name = readr::col_character(), lat = readr::col_double(), 
             lon = readr::col_double(), start_month = readr::col_character(), start_year = readr::col_character(), 
             end_month = readr::col_character(), end_year = readr::col_character(), years = readr::col_double(), 
             percent = readr::col_integer(), AWS = readr::col_character()), na = "")
  9: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
  10: datasource_connection(file, skip, skip_empty_rows, comment)
  11: read_connection(path)
  12: open(con, "rb")
  13: open.connection(con, "rb")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 23 | SKIPPED: 48 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: Error handling (@test-get_current_weather.R#7) 
  2. Error: Error handling (@test-get_historical.R#11) 
  
  Error: testthat unit tests failed
  Execution halted