Running ‘testthat.R’ [4s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(coalitions)
  > 
  > test_check("coalitions")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-scrapers.R:16:1): State wide german scrapers work ───────────────
  Error: Timeout was reached: [www.wahlrecht.de] Failed to connect to www.wahlrecht.de port 443: Connection timed out
  Backtrace:
       █
    1. ├─checkmate::expect_data_frame(...) test-scrapers.R:16:0
    2. │ └─checkmate::checkDataFrame(...)
    3. │   └─`%and%`(...)
    4. │     └─base::isTRUE(lhs)
    5. ├─utils::head(scrape_wahlrecht(hp.vec[1]))
    6. ├─coalitions::scrape_wahlrecht(hp.vec[1])
    7. │ ├─`%>%`(...)
    8. │ └─coalitions:::try_readHTML(address)
    9. │   └─base::tryCatch(...)
   10. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
   11. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   12. │         └─value[[3L]](cond)
   13. ├─rvest::html_table(., fill = TRUE)
   14. └─rvest::html_nodes(., "table")
   15.   └─rvest::html_elements(...)
  ── Error (test-scrapers.R:46:3): Federal german scrapers work ──────────────────
  Error: Timeout was reached: [www.wahlrecht.de] Failed to connect to www.wahlrecht.de port 443: Connection timed out
  Backtrace:
       █
    1. ├─scrape_by() %>% filter(date == as.Date("2018-02-12")) test-scrapers.R:46:2
    2. ├─dplyr::filter(., date == as.Date("2018-02-12"))
    3. ├─coalitions::scrape_by()
    4. │ ├─`%>%`(...)
    5. │ └─coalitions:::try_readHTML(address)
    6. │   └─base::tryCatch(...)
    7. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
    8. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9. │         └─value[[3L]](cond)
   10. ├─rvest::html_table(., fill = TRUE)
   11. └─rvest::html_nodes(., "table")
   12.   └─rvest::html_elements(...)
  ── Error (test-scrapers.R:89:3): Collapse parties works correctly ──────────────
  Error: Timeout was reached: [www.wahlrecht.de] Failed to connect to www.wahlrecht.de port 443: Connection timed out
  Backtrace:
       █
    1. ├─coalitions::scrape_wahlrecht("https://www.wahlrecht.de/umfragen/gms.htm") test-scrapers.R:89:2
    2. │ ├─`%>%`(...)
    3. │ └─coalitions:::try_readHTML(address)
    4. │   └─base::tryCatch(...)
    5. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
    6. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    7. │         └─value[[3L]](cond)
    8. ├─rvest::html_table(., fill = TRUE)
    9. └─rvest::html_nodes(., "table")
   10.   └─rvest::html_elements(...)
  ── Error (test-workflow.R:80:2): workflow stable ───────────────────────────────
  Error: Timeout was reached: [www.wahlrecht.de] Failed to connect to www.wahlrecht.de port 443: Connection timed out
  Backtrace:
       █
    1. ├─scrape_wahlrecht() %>% slice(1) %>% collapse_parties test-workflow.R:80:8
    2. ├─coalitions::collapse_parties(.)
    3. │ └─checkmate::assert_data_frame(surveys, min.rows = 1, min.cols = 3)
    4. │   └─checkmate::checkDataFrame(...)
    5. │     └─`%and%`(...)
    6. │       └─base::isTRUE(lhs)
    7. ├─dplyr::slice(., 1)
    8. ├─coalitions::scrape_wahlrecht()
    9. │ ├─`%>%`(...)
   10. │ └─coalitions:::try_readHTML(address)
   11. │   └─base::tryCatch(...)
   12. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
   13. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14. │         └─value[[3L]](cond)
   15. ├─rvest::html_table(., fill = TRUE)
   16. └─rvest::html_nodes(., "table")
   17.   └─rvest::html_elements(...)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 53 ]
  Error: Test failures
  In addition: Warning messages:
  1: In for (i in seq_len(n)) { :
    closing unused connection 6 (https://www.wahlrecht.de/umfragen/gms.htm)
  2: In for (i in seq_len(n)) { :
    closing unused connection 5 (https://www.wahlrecht.de/umfragen/landtage/bayern.htm)
  3: In for (i in seq_len(n)) { :
    closing unused connection 4 (https://www.wahlrecht.de/umfragen/allensbach.htm)
  Execution halted