Running ‘testthat.R’ [10s/20s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(ntdr)
  > 
  > test_check("ntdr")
  trying URL 'https://www.transit.dot.gov/sites/fta.dot.gov/files/2023-07/May%202023%20Complete%20Monthly%20Ridership%20%28with%20adjustments%20and%20estimates%29.xlsx'
  Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 13146750 bytes (12.5 MB)
  ==================================================
  downloaded 12.5 MB
  
  New names:
  * `156143` -> `156143...15`
  * `156143` -> `156143...16`
  * `141871` -> `141871...18`
  * `141871` -> `141871...19`
  * `146253` -> `146253...44`
  * `146253` -> `146253...45`
  trying URL 'https://www.transit.dot.gov/sites/fta.dot.gov/files/2023-07/May%202023%20Complete%20Monthly%20Ridership%20%28with%20adjustments%20and%20estimates%29.xlsx'
  Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 13146750 bytes (12.5 MB)
  ==================================================
  downloaded 12.5 MB
  
  New names:
  * `156143` -> `156143...15`
  * `156143` -> `156143...16`
  * `141871` -> `141871...18`
  * `141871` -> `141871...19`
  * `146253` -> `146253...44`
  * `146253` -> `146253...45`
  trying URL 'https://www.transit.dot.gov/sites/fta.dot.gov/files/2023-07/May%202023%20Complete%20Monthly%20Ridership%20%28with%20adjustments%20and%20estimates%29.xlsx'
  Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 13146750 bytes (12.5 MB)
  ==================================================
  downloaded 12.5 MB
  
  New names:
  * `156143` -> `156143...15`
  * `156143` -> `156143...16`
  * `141871` -> `141871...18`
  * `141871` -> `141871...19`
  * `146253` -> `146253...44`
  * `146253` -> `146253...45`
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 6 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-get_ntd.R:6:3'): agency accepts character vector of length > 1 as input ──
  Expected `get_ntd(agency = c("City of Madison", "Capital Area Transportation Authority"))` to run without any errors.
  i Actually got a <vctrs_error_ptype2> with text:
    Can't combine `2002-01-01` <character> and `2002-03-01` <double>.
  ── Error ('test-get_ntd.R:15:3'): column names are correct ─────────────────────
  <vctrs_error_ptype2/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `tidyr::pivot_longer(all_data, cols = 10:ncol(all_data), names_to = "month", 
      values_to = "value")`: Can't combine `2002-01-01` <character> and `2002-03-01` <double>.
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-get_ntd.R:15:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::colnames(get_ntd())
    5. │ └─base::is.data.frame(x)
    6. ├─ntdr::get_ntd()
    7. │ ├─dplyr::mutate(...)
    8. │ ├─tidyr::pivot_longer(...)
    9. │ └─tidyr:::pivot_longer.data.frame(all_data, cols = 10:ncol(all_data), names_to = "month", values_to = "value")
   10. │   └─tidyr::pivot_longer_spec(...)
   11. │     └─vctrs::vec_ptype_common(...)
   12. └─vctrs (local) `<fn>`()
   13.   └─vctrs::vec_default_ptype2(...)
   14.     ├─base::withRestarts(...)
   15.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   16.     │   └─base (local) doWithOneRestart(return(expr), restart)
   17.     └─vctrs::stop_incompatible_type(...)
   18.       └─vctrs:::stop_incompatible(...)
   19.         └─vctrs:::stop_vctrs(...)
   20.           └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-get_ntd.R:35:3'): ntd variable has correct value ───────────────
  <vctrs_error_ptype2/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `tidyr::pivot_longer(all_data, cols = 10:ncol(all_data), names_to = "month", 
      values_to = "value")`: Can't combine `2002-01-01` <character> and `2002-03-01` <double>.
  Backtrace:
       ▆
    1. ├─ntdr::get_ntd() at test-get_ntd.R:35:2
    2. │ ├─dplyr::mutate(...)
    3. │ ├─tidyr::pivot_longer(...)
    4. │ └─tidyr:::pivot_longer.data.frame(all_data, cols = 10:ncol(all_data), names_to = "month", values_to = "value")
    5. │   └─tidyr::pivot_longer_spec(...)
    6. │     └─vctrs::vec_ptype_common(...)
    7. └─vctrs (local) `<fn>`()
    8.   └─vctrs::vec_default_ptype2(...)
    9.     ├─base::withRestarts(...)
   10.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   11.     │   └─base (local) doWithOneRestart(return(expr), restart)
   12.     └─vctrs::stop_incompatible_type(...)
   13.       └─vctrs:::stop_incompatible(...)
   14.         └─vctrs:::stop_vctrs(...)
   15.           └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 6 ]
  Error: Test failures
  Execution halted