Running 'testthat.R' [34s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > print(Sys.getenv("NOT_CRAN"))
  [1] ""
  > testthat::test_check("pxweb")
  Loading required package: pxweb
  pxweb: R tools for PX-WEB API.
  Copyright (C) 2014-2018 Mans Magnusson, Leo Lahti et al.
  https://github.com/ropengov/pxweb
  
  -- 1. Error: Test warnings (@test-get_pxweb_data.R#154)  -----------------------
  No internet connection to http://api.scb.se/OV0104/v1/doris/sv/ssd/TK/TK1001/TK1001S/SnabbStatTK1001
  1: expect_that({
         test_url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/TK/TK1001/TK1001S/SnabbStatTK1001"
         test_dims <- list(ContentsCode = c("TK1001AE"), Tid = c("2014M02"))
         test_data <- get_pxweb_data(url = test_url, dims = test_dims, clean = FALSE)
     }, gives_warning()) at testthat/test-get_pxweb_data.R:154
  2: condition(object)
  3: expect_warning(x, regexp = regexp, all = all, ...)
  4: quasi_capture(enquo(object), capture_warnings, label = label)
  5: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  6: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  7: eval_bare(get_expr(quo), get_env(quo))
  8: get_pxweb_data(url = test_url, dims = test_dims, clean = FALSE) at testthat/test-get_pxweb_data.R:157
  9: suppressWarnings(reorder_and_check_dims(url, dims))
  10: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  11: reorder_and_check_dims(url, dims)
  12: get_pxweb_metadata(path = url)
  13: stop(stringr::str_c("No internet connection to ", url), call. = FALSE)
  
  -- 2. Error: create_batch_list() (@test-utils_internal.R#41)  ------------------
  No internet connection to http://api.scb.se/OV0104/v1/doris/sv/ssd/PR/PR0101/PR0101E/Basbeloppet
  1: expect_warning(res <- pxweb:::create_batch_list(url = test$url, dims = test$dims)) at testthat/test-utils_internal.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: pxweb:::create_batch_list(url = test$url, dims = test$dims)
  7: get_dim_size(url = url, dims = dims)
  8: get_pxweb_metadata(url)
  9: stop(stringr::str_c("No internet connection to ", url), call. = FALSE)
  
  == testthat results  ===========================================================
  OK: 96 SKIPPED: 50 FAILED: 2
  1. Error: Test warnings (@test-get_pxweb_data.R#154) 
  2. Error: create_batch_list() (@test-utils_internal.R#41) 
  
  Error: testthat unit tests failed
  Execution halted