Running ‘testthat.R’ [6s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tropr)
  > 
  > test_check("tropr")
  <simpleError in trope_content(trope_url): Failed to find tvtrope content>
  <simpleError in trope_content(trope_url): Failed to find tvtrope content>
  ── 1. Error: trope_data (@test-data.R#6)  ──────────────────────────────────────
  cannot open the connection
  1: trope_data(.urls) at testthat/test-data.R:6
  2: do.call(rbind, lapply(csv_files, function(csv_file) {
         target_data <- read.csv2(csv_file, stringsAsFactors = F)
         if (nrow(target_data) > 0) {
             target_data
         }
         else {
             NULL
         }
     }))
  3: lapply(csv_files, function(csv_file) {
         target_data <- read.csv2(csv_file, stringsAsFactors = F)
         if (nrow(target_data) > 0) {
             target_data
         }
         else {
             NULL
         }
     })
  4: FUN(X[[i]], ...)
  5: read.csv2(csv_file, stringsAsFactors = F)
  6: read.table(file = file, header = header, sep = sep, quote = quote, dec = dec, fill = fill, 
         comment.char = comment.char, ...)
  7: file(file, "rt")
  
  <simpleError in trope_content(trope_url): Failed to find tvtrope content>
  ── 2. Error: trope_cache (@test-data.R#19)  ────────────────────────────────────
  cannot open the connection
  1: trope_cache(urls, depth = 1, verbose = F) at testthat/test-data.R:19
  2: trope_data(urls_to_process, cache_dir = trope_cache_dir, sleep = sleep, verbose = verbose)
  3: do.call(rbind, lapply(csv_files, function(csv_file) {
         target_data <- read.csv2(csv_file, stringsAsFactors = F)
         if (nrow(target_data) > 0) {
             target_data
         }
         else {
             NULL
         }
     }))
  4: lapply(csv_files, function(csv_file) {
         target_data <- read.csv2(csv_file, stringsAsFactors = F)
         if (nrow(target_data) > 0) {
             target_data
         }
         else {
             NULL
         }
     })
  5: FUN(X[[i]], ...)
  6: read.csv2(csv_file, stringsAsFactors = F)
  7: read.table(file = file, header = header, sep = sep, quote = quote, dec = dec, fill = fill, 
         comment.char = comment.char, ...)
  8: file(file, "rt")
  
  ── 3. Error: trope_content, as.data.frame (@test-tropr.R#5)  ───────────────────
  Failed to find tvtrope content
  1: trope_content(.url) at testthat/test-tropr.R:5
  2: stop("Failed to find tvtrope content")
  
  ── 4. Error: trope_history, aggr (@test-tropr.R#14)  ───────────────────────────
  Failed to find tvtrope content
  1: trope_history(.url) at testthat/test-tropr.R:14
  2: trope_content(hist_url)
  3: stop("Failed to find tvtrope content")
  
  ── 5. Error: More cases (@test-tropr.R#26)  ────────────────────────────────────
  Failed to find tvtrope content
  1: as.data.frame(trope_content(.url)) at testthat/test-tropr.R:26
  2: trope_content(.url)
  3: stop("Failed to find tvtrope content")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 3 SKIPPED: 0 FAILED: 5
  1. Error: trope_data (@test-data.R#6) 
  2. Error: trope_cache (@test-data.R#19) 
  3. Error: trope_content, as.data.frame (@test-tropr.R#5) 
  4. Error: trope_history, aggr (@test-tropr.R#14) 
  5. Error: More cases (@test-tropr.R#26) 
  
  Error: testthat unit tests failed
  Execution halted