Running ‘testthat.R’ [3s/53s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(crimedata)
  > 
  > test_check("crimedata")
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 35 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_get_crime_data.R:4'): return value of get_crime_data is a tibble or SF object ──
  Error in `readRDS(temp_file)`: unknown input format
  Backtrace:
      ▆
   1. ├─testthat::expect_is(get_crime_data(), "tbl_df") at test_get_crime_data.R:4:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─crimedata::get_crime_data()
   5.   └─purrr::map_dfr(...)
   6.     └─purrr::map(.x, .f, ...)
   7.       └─crimedata (local) .f(.x[[i]], ...)
   8.         └─base::readRDS(temp_file)
  ── Error ('test_get_crime_data.R:40'): partially missing data produce warnings ──
  Error in `readRDS(temp_file)`: unknown input format
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test_get_crime_data.R:40:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─crimedata::get_crime_data(cities = "Virginia Beach", years = 2012:2013)
    7.   └─purrr::map_dfr(...)
    8.     └─purrr::map(.x, .f, ...)
    9.       └─crimedata (local) .f(.x[[i]], ...)
   10.         └─base::readRDS(temp_file)
  ── Error ('test_get_crime_data.R:49'): quiet execution does not return any messages ──
  Error in `readRDS(temp_file)`: unknown input format
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test_get_crime_data.R:49:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─crimedata::get_crime_data(years = 2019, quiet = TRUE)
    7.   └─purrr::map_dfr(...)
    8.     └─purrr::map(.x, .f, ...)
    9.       └─crimedata (local) .f(.x[[i]], ...)
   10.         └─base::readRDS(temp_file)
  ── Error ('test_get_crime_data.R:55'): data cache works as expected ────────────
  Error in `readRDS(temp_file)`: unknown input format
  Backtrace:
      ▆
   1. └─crimedata::get_crime_data(cities = "Detroit") at test_get_crime_data.R:55:2
   2.   └─purrr::map_dfr(...)
   3.     └─purrr::map(.x, .f, ...)
   4.       └─crimedata (local) .f(.x[[i]], ...)
   5.         └─base::readRDS(temp_file)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 35 ]
  Error: Test failures
  Execution halted