Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(coalitions)
  > 
  > test_check("coalitions")
  ── 1. Error: State wide german scrapers work (@test-scrapers.R#13)  ────────────
  Failed to connect to www.wahlrecht.de port 443: Connection refused
  1: expect_data_frame(head(scrape_wahlrecht(hp.vec[1])), ncols = 11, nrows = 6) at testthat/test-scrapers.R:13
  2: checkDataFrame(x, types, any.missing, all.missing, min.rows, min.cols, nrows, ncols, 
         row.names, col.names, null.ok)
  3: .Call(c_check_dataframe, x, any.missing, all.missing, min.rows, min.cols, nrows, 
         ncols, row.names, col.names, null.ok) %and% checkListTypes(x, types)
  4: head(scrape_wahlrecht(hp.vec[1]))
  5: scrape_wahlrecht(hp.vec[1])
  6: read_html(address) %>% html_nodes("table") %>% .[[2]] %>% html_table(fill = TRUE)
  7: eval(lhs, parent, parent)
  8: eval(lhs, parent, parent)
  9: read_html(address)
  10: read_html.default(address)
  11: suppressWarnings(read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options))
  12: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  13: read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
  14: read_xml.character(x, encoding = encoding, ..., as_html = TRUE, options = options)
  15: read_xml.connection(con, encoding = encoding, ..., as_html = as_html, base_url = x, 
         options = options)
  16: open(x, "rb")
  17: open.connection(x, "rb")
  
  ── 2. Error: Federal german scrapers work (@test-scrapers.R#40)  ───────────────
  Failed to connect to www.wahlrecht.de port 443: Connection refused
  1: scrape_by() %>% filter(date == as.Date("2018-02-12")) at testthat/test-scrapers.R:40
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: scrape_by()
  5: read_html(address) %>% html_nodes("table") %>% .[[2]] %>% html_table(fill = TRUE)
  6: eval(lhs, parent, parent)
  7: eval(lhs, parent, parent)
  8: read_html(address)
  9: read_html.default(address)
  10: suppressWarnings(read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options))
  11: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  12: read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
  13: read_xml.character(x, encoding = encoding, ..., as_html = TRUE, options = options)
  14: read_xml.connection(con, encoding = encoding, ..., as_html = as_html, base_url = x, 
         options = options)
  15: open(x, "rb")
  16: open.connection(x, "rb")
  
  ── 3. Error: Collapse parties works correctly (@test-scrapers.R#71)  ───────────
  Failed to connect to www.wahlrecht.de port 443: Connection refused
  1: scrape_wahlrecht("https://www.wahlrecht.de/umfragen/gms.htm") at testthat/test-scrapers.R:71
  2: read_html(address) %>% html_nodes("table") %>% .[[2]] %>% html_table(fill = TRUE)
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: read_html(address)
  6: read_html.default(address)
  7: suppressWarnings(read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options))
  8: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  9: read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
  10: read_xml.character(x, encoding = encoding, ..., as_html = TRUE, options = options)
  11: read_xml.connection(con, encoding = encoding, ..., as_html = as_html, base_url = x, 
         options = options)
  12: open(x, "rb")
  13: open.connection(x, "rb")
  
  ── 4. Error: workflow stable (@test-workflow.R#78)  ────────────────────────────
  Failed to connect to www.wahlrecht.de port 443: Connection refused
  1: scrape_wahlrecht() %>% slice(1) %>% collapse_parties at testthat/test-workflow.R:78
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: scrape_wahlrecht()
  5: read_html(address) %>% html_nodes("table") %>% .[[2]] %>% html_table(fill = TRUE)
  6: eval(lhs, parent, parent)
  7: eval(lhs, parent, parent)
  8: read_html(address)
  9: read_html.default(address)
  10: suppressWarnings(read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options))
  11: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  12: read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
  13: read_xml.character(x, encoding = encoding, ..., as_html = TRUE, options = options)
  14: read_xml.connection(con, encoding = encoding, ..., as_html = as_html, base_url = x, 
         options = options)
  15: open(x, "rb")
  16: open.connection(x, "rb")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 47 SKIPPED: 0 FAILED: 4
  1. Error: State wide german scrapers work (@test-scrapers.R#13) 
  2. Error: Federal german scrapers work (@test-scrapers.R#40) 
  3. Error: Collapse parties works correctly (@test-scrapers.R#71) 
  4. Error: workflow stable (@test-workflow.R#78) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: In .Internal(environment(fun)) :
    closing unused connection 5 (https://www.wahlrecht.de/umfragen/gms.htm)
  2: In .Internal(environment(fun)) :
    closing unused connection 3 (https://www.wahlrecht.de/umfragen/landtage/bayern.htm)
  Execution halted