Running ‘testthat.R’ [4s/427s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bomrang)
  
  Data (c) Australian Government Bureau of Meteorology,
  Creative Commons (CC) Attribution 3.0 licence or
  Public Access Licence (PAL) as appropriate.
  See http://www.bom.gov.au/other/copyright.shtml
  
  
  If you use bomrang, please cite it.
  See `citation('bomrang')` for the proper citation.
  
  > 
  > 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), capture_warnings, label = label)
  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: Query 'Melbourne Airport' returns data frame w/ correct station (@t
  
  A station was matched. However, a corresponding JSON file was not found at bom.gov.au.
  1: get_current_weather("Melbourne Airport", raw = TRUE) at testthat/test-get_current_weather.R:20
  2: 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)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  ── 3. Error: Query of 'Melbourne Airport' returns time if cooked. (@test-get_cur
  
  A station was matched. However, a corresponding JSON file was not found at bom.gov.au.
  1: get_current_weather("Melbourne Airport") at testthat/test-get_current_weather.R:26
  2: 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)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  ── 4. Error: Query of 'Sydney' defaults to Observatory Hill (@test-get_current_w
  
  A station was matched. However, a corresponding JSON file was not found at bom.gov.au.
  1: expect_warning(get_current_weather("Sydney"), regexp = "Multiple stations match") at testthat/test-get_current_weather.R:33
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  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("Sydney")
  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)
  
  ── 5. Error: Query of 'castlem' and friends (@test-get_current_weather.R#41)  ──
  
  A station was matched. However, a corresponding JSON file was not found at bom.gov.au.
  1: expect_warning(get_current_weather(station_name = "castlem")) at testthat/test-get_current_weather.R:41
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  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(station_name = "castlem")
  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)
  
  ── 6. Error: Strict (@test-get_current_weather.R#49)  ──────────────────────────
  
  A station was matched. However, a corresponding JSON file was not found at bom.gov.au.
  1: get_current_weather("FORREST", strict = TRUE) at testthat/test-get_current_weather.R:49
  2: 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)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  ── 7. Error: Data table if requested (@test-get_current_weather.R#61)  ─────────
  
  A station was matched. However, a corresponding JSON file was not found at bom.gov.au.
  1: get_current_weather("Melbourne Airport", as.data.table = TRUE) at testthat/test-get_current_weather.R:61
  2: 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)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 18 SKIPPED: 32 FAILED: 7
  1. Error: Error handling (@test-get_current_weather.R#7) 
  2. Error: Query 'Melbourne Airport' returns data frame w/ correct station (@test-get_current_weather.R#20) 
  3. Error: Query of 'Melbourne Airport' returns time if cooked. (@test-get_current_weather.R#26) 
  4. Error: Query of 'Sydney' defaults to Observatory Hill (@test-get_current_weather.R#33) 
  5. Error: Query of 'castlem' and friends (@test-get_current_weather.R#41) 
  6. Error: Strict (@test-get_current_weather.R#49) 
  7. Error: Data table if requested (@test-get_current_weather.R#61) 
  
  Error: testthat unit tests failed
  Execution halted