Running ‘testthat.R’ [92s/196s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(weathercan)
  > 
  > Sys.setenv("R_TESTS" = "")
  > 
  > test_check("weathercan")
  ── 1. Error: weather_html/raw (hour) download a data frame (@test_04_weather_raw
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_silent(wd <- weather_html(station_id = 51423, date = as.Date("2014-01-01"), 
         interval = "hour")) at testthat/test_04_weather_raw.R:6
  2: quasi_capture(enquo(object), NULL, evaluate_promise)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(.quo), get_env(.quo))
  9: weather_html(station_id = 51423, date = as.Date("2014-01-01"), interval = "hour")
  10: httr::GET(url, query = list(format = "csv", stationID = station_id, timeframe = ifelse(interval == 
         "hour", 1, ifelse(interval == "day", 2, 3)), Year = format(date, "%Y"), Month = format(date, 
         "%m"), submit = "Download+Data"))
  11: request_perform(req, hu$handle$handle)
  12: request_fetch(req$output, req$url, handle)
  13: request_fetch.write_memory(req$output, req$url, handle)
  14: curl::curl_fetch_memory(url, handle = handle)
  
  ── 2. Error: weather_html/raw (day) download a data frame (@test_04_weather_raw.
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_silent(wd <- weather_html(station_id = 51423, date = as.Date("2014-01-01"), 
         interval = "day")) at testthat/test_04_weather_raw.R:23
  2: quasi_capture(enquo(object), NULL, evaluate_promise)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(.quo), get_env(.quo))
  9: weather_html(station_id = 51423, date = as.Date("2014-01-01"), interval = "day")
  10: httr::GET(url, query = list(format = "csv", stationID = station_id, timeframe = ifelse(interval == 
         "hour", 1, ifelse(interval == "day", 2, 3)), Year = format(date, "%Y"), Month = format(date, 
         "%m"), submit = "Download+Data"))
  11: request_perform(req, hu$handle$handle)
  12: request_fetch(req$output, req$url, handle)
  13: request_fetch.write_memory(req$output, req$url, handle)
  14: curl::curl_fetch_memory(url, handle = handle)
  
  ── 3. Error: weather_html/raw (month) download a data frame (@test_04_weather_ra
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_silent(wd <- weather_html(station_id = 43823, date = as.Date("2005-01-01"), 
         interval = "month")) at testthat/test_04_weather_raw.R:39
  2: quasi_capture(enquo(object), NULL, evaluate_promise)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(.quo), get_env(.quo))
  9: weather_html(station_id = 43823, date = as.Date("2005-01-01"), interval = "month")
  10: httr::GET(url, query = list(format = "csv", stationID = station_id, timeframe = ifelse(interval == 
         "hour", 1, ifelse(interval == "day", 2, 3)), Year = format(date, "%Y"), Month = format(date, 
         "%m"), submit = "Download+Data"))
  11: request_perform(req, hu$handle$handle)
  12: request_fetch(req$output, req$url, handle)
  13: request_fetch.write_memory(req$output, req$url, handle)
  14: curl::curl_fetch_memory(url, handle = handle)
  
  ── 4. Error: weather (hour) returns a data frame (@test_06_weather_dl.R#6)  ────
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_silent({
         weather_dl(station_ids = 51423, start = "2014-01-01", end = "2014-01-31")
     }) at testthat/test_06_weather_dl.R:6
  2: quasi_capture(enquo(object), NULL, evaluate_promise)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(.quo), get_env(.quo))
  9: weather_dl(station_ids = 51423, start = "2014-01-01", end = "2014-01-31") at testthat/test_06_weather_dl.R:6
  10: dplyr::tibble(date_range = date_range) %>% dplyr::mutate(html = purrr::map(date_range, 
         ~weather_html(station_id = s, date = .x, interval = interval, url = url)), preamble = purrr::map(html, 
         ~preamble_raw(.x, encoding = encoding)), skip = purrr::map_dbl(preamble, ~nrow(.x))) %>% 
         dplyr::filter(skip > 3)
  ...
  18: mutate.tbl_df(., html = purrr::map(date_range, ~weather_html(station_id = s, date = .x, 
         interval = interval, url = url)), preamble = purrr::map(html, ~preamble_raw(.x, 
         encoding = encoding)), skip = purrr::map_dbl(preamble, ~nrow(.x)))
  19: mutate_impl(.data, dots, caller_env())
  20: purrr::map(date_range, ~weather_html(station_id = s, date = .x, interval = interval, 
         url = url))
  21: .f(.x[[i]], ...)
  22: weather_html(station_id = s, date = .x, interval = interval, url = url)
  23: httr::GET(url, query = list(format = "csv", stationID = station_id, timeframe = ifelse(interval == 
         "hour", 1, ifelse(interval == "day", 2, 3)), Year = format(date, "%Y"), Month = format(date, 
         "%m"), submit = "Download+Data"))
  24: request_perform(req, hu$handle$handle)
  25: request_fetch(req$output, req$url, handle)
  26: request_fetch.write_memory(req$output, req$url, handle)
  27: curl::curl_fetch_memory(url, handle = handle)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 450 SKIPPED: 5 WARNINGS: 0 FAILED: 4
  1. Error: weather_html/raw (hour) download a data frame (@test_04_weather_raw.R#6) 
  2. Error: weather_html/raw (day) download a data frame (@test_04_weather_raw.R#23) 
  3. Error: weather_html/raw (month) download a data frame (@test_04_weather_raw.R#39) 
  4. Error: weather (hour) returns a data frame (@test_06_weather_dl.R#6) 
  
  Error: testthat unit tests failed
  Execution halted