Running ‘testthat.R’ [33s/36s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gutenbergr)
  > 
  > test_check("gutenbergr")
  ── 1. Error: gutenberg_get_mirror works (@test-download.R#8)  ──────────────────
  HTTP error 404.
  Backtrace:
   1. gutenbergr::gutenberg_get_mirror()
   2. readr::read_lines(wget_url)
   3. readr::datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
   4. readr:::datasource_connection(file, skip, skip_empty_rows, comment)
   5. readr:::read_connection(path)
   7. base::open.connection(con, "rb")
  
  ── 2. Error: Can download Charles Dickens' Christmas Carol and Jane Austen's Per
  HTTP error 404.
  Backtrace:
   1. gutenbergr::gutenberg_download(...)
   2. gutenbergr::gutenberg_get_mirror(verbose = verbose)
   3. readr::read_lines(wget_url)
   4. readr::datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
   5. readr:::datasource_connection(file, skip, skip_empty_rows, comment)
   6. readr:::read_connection(path)
   8. base::open.connection(con, "rb")
  
  ── 3. Error: Can download books from a data frame with gutenberg_id column (@tes
  HTTP error 404.
  Backtrace:
    1. gutenbergr::gutenberg_works(title == "The United States Constitution")
    9. gutenbergr::gutenberg_download(.)
   10. gutenbergr::gutenberg_get_mirror(verbose = verbose)
   11. readr::read_lines(wget_url)
   12. readr::datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
   13. readr:::datasource_connection(file, skip, skip_empty_rows, comment)
   14. readr:::read_connection(path)
   16. base::open.connection(con, "rb")
  
  ── 4. Error: We can download a file that only has a -8 version (@test-download.R
  HTTP error 404.
  Backtrace:
   1. gutenbergr::gutenberg_download(8438)
   2. gutenbergr::gutenberg_get_mirror(verbose = verbose)
   3. readr::read_lines(wget_url)
   4. readr::datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
   5. readr:::datasource_connection(file, skip, skip_empty_rows, comment)
   6. readr:::read_connection(path)
   8. base::open.connection(con, "rb")
  
  ── 5. Error: Trying to download a non-existent book raises a warning (@test-down
  HTTP error 404.
  Backtrace:
    1. testthat::expect_warning(...)
    6. gutenbergr::gutenberg_download(c(5, 1e+06))
    7. gutenbergr::gutenberg_get_mirror(verbose = verbose)
    8. readr::read_lines(wget_url)
    9. readr::datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
   10. readr:::datasource_connection(file, skip, skip_empty_rows, comment)
   11. readr:::read_connection(path)
   13. base::open.connection(con, "rb")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 29 | SKIPPED: 1 | WARNINGS: 2 | FAILED: 5 ]
  1. Error: gutenberg_get_mirror works (@test-download.R#8) 
  2. Error: Can download Charles Dickens' Christmas Carol and Jane Austen's Persuasion (@test-download.R#19) 
  3. Error: Can download books from a data frame with gutenberg_id column (@test-download.R#40) 
  4. Error: We can download a file that only has a -8 version (@test-download.R#49) 
  5. Error: Trying to download a non-existent book raises a warning (@test-download.R#55) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: In for (i in seq_len(n)) { :
    closing unused connection 5 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  2: In .External(vctrs_new_data_frame, x, n, class, ...) :
    closing unused connection 7 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  3: In .External(vctrs_new_data_frame, x, n, class, ...) :
    closing unused connection 6 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  4: In .External(vctrs_new_data_frame, x, n, class, ...) :
    closing unused connection 5 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  5: closing unused connection 4 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt) 
  Execution halted