Running ‘testthat.R’ [9s/26s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(coalitions)
  > 
  > test_check("coalitions")
  ── 1. Error: Federal german scrapers work (@test-scrapers.R#54)  ───────────────
  HTTP error 500.
  1: get_surveys_nds() at testthat/test-scrapers.R:54
  2: scrape_ltw()
  3: read_html(address) %>% html_nodes("table") %>% .[[2]] %>% html_table(fill = TRUE)
  4: eval(lhs, parent, parent)
  5: eval(lhs, parent, parent)
  6: read_html(address)
  7: read_html.default(address)
  8: suppressWarnings(read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options))
  9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  10: read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
  11: read_xml.character(x, encoding = encoding, ..., as_html = TRUE, options = options)
  12: read_xml.connection(con, encoding = encoding, ..., as_html = as_html, base_url = x, 
         options = options)
  13: open(x, "rb")
  14: open.connection(x, "rb")
  
  ── 2. Error: Collapse parties works correctly (@test-scrapers.R#71)  ───────────
  HTTP error 503.
  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")
  
  ── 3. Error: workflow stable (@test-workflow.R#78)  ────────────────────────────
  HTTP error 503.
  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: 67 SKIPPED: 0 WARNINGS: 14 FAILED: 3
  1. Error: Federal german scrapers work (@test-scrapers.R#54) 
  2. Error: Collapse parties works correctly (@test-scrapers.R#71) 
  3. Error: workflow stable (@test-workflow.R#78) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: closing unused connection 5 (https://www.wahlrecht.de/umfragen/gms.htm) 
  2: closing unused connection 4 (https://www.wahlrecht.de/umfragen/landtage/niedersachsen.htm) 
  Execution halted