Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(comperes)
  > 
  > test_check("comperes")
  ── 1. Error: h2h_long works (@test-head-to-head.R#33)  ─────────────────────────
  'where' must be an environment
  Backtrace:
    1. comperes::h2h_long(...)
    9. comperes::get_matchups(.)
    3. dplyr::left_join(...)
   11. comperes::as_widecr(.)
   20. comperes:::repair_widecr(res, ...)
   21. comperes::is_widecr(cr_data)
   14. tidyr::extract(...)
   30. ellipsis::check_dots_used()
   32. ellipsis:::exit_handler(action)
   33. base::bquote(...)
  
  ── 2. Error: h2h_long handles `player` as factor (@test-head-to-head.R#52)  ────
  'where' must be an environment
  Backtrace:
    1. comperes::h2h_long(input, sum_score = sum(score1 + score2))
    2. dplyr::mutate(., player = as.character(.data$player))
    9. comperes::get_matchups(.)
    4. dplyr::left_join(...)
   12. comperes::as_widecr(.)
   20. comperes:::repair_widecr(res, ...)
   21. comperes::is_widecr(cr_data)
   15. tidyr::extract(...)
   30. ellipsis::check_dots_used()
   32. ellipsis:::exit_handler(action)
   33. base::bquote(...)
  
  ── 3. Error: h2h_long handles unnamed Head-to-Head functions (@test-head-to-head
  'where' must be an environment
  Backtrace:
    1. comperes::h2h_long(cr_data, sum(score1))
    9. comperes::get_matchups(.)
    3. dplyr::left_join(...)
   11. comperes::as_widecr(.)
   20. comperes:::repair_widecr(res, ...)
   21. comperes::is_widecr(cr_data)
   14. tidyr::extract(...)
   30. ellipsis::check_dots_used()
   32. ellipsis:::exit_handler(action)
   33. base::bquote(...)
  
  ── 4. Error: h2h_long handles not NULL `fill` (@test-head-to-head.R#73)  ───────
  'where' must be an environment
  Backtrace:
    1. comperes::h2h_long(...)
    9. comperes::get_matchups(.)
    3. dplyr::left_join(...)
   11. comperes::as_widecr(.)
   20. comperes:::repair_widecr(res, ...)
   21. comperes::is_widecr(cr_data)
   14. tidyr::extract(...)
   30. ellipsis::check_dots_used()
   32. ellipsis:::exit_handler(action)
   33. base::bquote(...)
  
  ── 5. Error: h2h_mat works (@test-head-to-head.R#122)  ─────────────────────────
  'where' must be an environment
  Backtrace:
    1. testthat::expect_equal(...)
   10. comperes::h2h_mat(., mean_score1 = mean(score1))
   11. comperes::h2h_long(., !!!dots)
   11. comperes::get_matchups(.)
    5. dplyr::left_join(...)
   13. comperes::as_widecr(.)
   40. comperes:::repair_widecr(res, ...)
   41. comperes::is_widecr(cr_data)
   16. tidyr::extract(...)
   50. ellipsis::check_dots_used()
   52. ellipsis:::exit_handler(action)
   53. base::bquote(...)
  
  ── 6. Error: h2h_mat handles `player` as factor (@test-head-to-head.R#149)  ────
  'where' must be an environment
  Backtrace:
    1. comperes::h2h_mat(input, sum(score1 + score2))
   10. comperes::h2h_long(., !!!dots)
    3. dplyr::mutate(., player = as.character(.data$player))
   10. comperes::get_matchups(.)
    5. dplyr::left_join(...)
   13. comperes::as_widecr(.)
   29. comperes:::repair_widecr(res, ...)
   30. comperes::is_widecr(cr_data)
   16. tidyr::extract(...)
   39. ellipsis::check_dots_used()
   41. ellipsis:::exit_handler(action)
   42. base::bquote(...)
  
  ── 7. Error: h2h_mat allows multiple Head-to-Head functions (@test-head-to-head.
  'where' must be an environment
  Backtrace:
    1. testthat::expect_silent(h2h_mat(cr_data))
    9. comperes::h2h_mat(cr_data)
   11. comperes::h2h_long(., !!!dots)
   11. comperes::get_matchups(.)
    5. dplyr::left_join(...)
   13. comperes::as_widecr(.)
   37. comperes:::repair_widecr(res, ...)
   38. comperes::is_widecr(cr_data)
   16. tidyr::extract(...)
   47. ellipsis::check_dots_used()
   49. ellipsis:::exit_handler(action)
   50. base::bquote(...)
  
  ── 8. Error: h2h_mat handles not NULL `fill` (@test-head-to-head.R#180)  ───────
  'where' must be an environment
  Backtrace:
    9. comperes::h2h_mat(., mean_score1 = mean(score1), fill = 0)
   10. comperes::h2h_long(., !!!dots)
   10. comperes::get_matchups(.)
    4. dplyr::left_join(...)
   12. comperes::as_widecr(.)
   37. comperes:::repair_widecr(res, ...)
   38. comperes::is_widecr(cr_data)
   15. tidyr::extract(...)
   47. ellipsis::check_dots_used()
   49. ellipsis:::exit_handler(action)
   50. base::bquote(...)
  
  ── 9. Error: h2h_funs can be used with !!! (@test-head-to-head.R#216)  ─────────
  'where' must be an environment
  Backtrace:
    1. comperes::h2h_long(cr_data, !!!h2h_funs[c("num_wins", "num_wins2")])
    9. comperes::get_matchups(.)
    3. dplyr::left_join(...)
   11. comperes::as_widecr(.)
   20. comperes:::repair_widecr(res, ...)
   21. comperes::is_widecr(cr_data)
   14. tidyr::extract(...)
   30. ellipsis::check_dots_used()
   32. ellipsis:::exit_handler(action)
   33. base::bquote(...)
  
  ── 10. Error: to_pairgames doesn't change pairgames (@test-pairgames.R#50)  ────
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(as_widecr(ncaa2005), to_pairgames(ncaa2005))
    5. comperes:::as_widecr.longcr(ncaa2005)
    6. comperes:::repair_widecr(res)
    7. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   16. ellipsis::check_dots_used()
   18. ellipsis:::exit_handler(action)
   19. base::bquote(...)
  
  ── 11. Error: is_pairgames works (@test-pairgames.R#71)  ───────────────────────
  'where' must be an environment
  Backtrace:
    1. testthat::expect_true(is_pairgames(input_pairgames))
    4. comperes::is_pairgames(input_pairgames)
   10. comperes::as_longcr(., repair = TRUE)
   14. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   23. ellipsis::check_dots_used()
   25. ellipsis:::exit_handler(action)
   26. base::bquote(...)
  
  ── 12. Error: as_longcr.widecr does simple converting (@test-results-longcr.R#19
  'where' must be an environment
  Backtrace:
    1. comperes::as_longcr(input_widecr, repair = TRUE)
    2. comperes:::as_longcr.widecr(input_widecr, repair = TRUE)
    3. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   12. ellipsis::check_dots_used()
   14. ellipsis:::exit_handler(action)
   15. base::bquote(...)
  
  ── 13. Error: as_longcr.widecr orders by game and pair id during repair (@test-r
  'where' must be an environment
  Backtrace:
    1. comperes::as_longcr(input_widecr_1, repair = TRUE)
    2. comperes:::as_longcr.widecr(input_widecr_1, repair = TRUE)
    3. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   12. ellipsis::check_dots_used()
   14. ellipsis:::exit_handler(action)
   15. base::bquote(...)
  
  ── 14. Error: as_longcr.widecr preserves column types (@test-results-longcr.R#23
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_longcr.widecr(input_types1, repair = TRUE)
    6. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   15. ellipsis::check_dots_used()
   17. ellipsis:::exit_handler(action)
   18. base::bquote(...)
  
  ── 15. Error: as_longcr.widecr removes duplicated 'game'-'player'
            if r
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_longcr.widecr(input_dupl, repair = TRUE)
    6. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   15. ellipsis::check_dots_used()
   17. ellipsis:::exit_handler(action)
   18. base::bquote(...)
  
  ── 16. Error: as_longcr.widecr works without column 'game' (@test-results-longcr
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(as_longcr(input_widecr_nogame), output_ref_longcr_from_widecr_nogame)
    5. comperes:::as_longcr.widecr(input_widecr_nogame)
    6. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   15. ellipsis::check_dots_used()
   17. ellipsis:::exit_handler(action)
   18. base::bquote(...)
  
  ── 17. Failure: as_longcr.widecr throws error on corrupted widecr object (@test-
  `as_longcr(input_widecr_corrupt)` threw an error with unexpected message.
  Expected match: "not.*widecr"
  Actual message: "'where' must be an environment"
  Backtrace:
    1. testthat::expect_error(as_longcr(input_widecr_corrupt), "not.*widecr")
    7. comperes:::as_longcr.widecr(input_widecr_corrupt)
    8. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  ── 18. Error: is_widecr works (@test-results-widecr.R#43)  ─────────────────────
  'where' must be an environment
  Backtrace:
    1. testthat::expect_true(is_widecr(output_ref_2))
    4. comperes::is_widecr(output_ref_2)
   10. tidyr::extract(...)
   13. ellipsis::check_dots_used()
   15. ellipsis:::exit_handler(action)
   16. base::bquote(...)
  
  ── 19. Error: is_widecr isn't affected by extra columns (@test-results-widecr.R#
  'where' must be an environment
  Backtrace:
    1. testthat::expect_true(is_widecr(output_ref_2))
    4. comperes::is_widecr(output_ref_2)
   10. tidyr::extract(...)
   13. ellipsis::check_dots_used()
   15. ellipsis:::exit_handler(action)
   16. base::bquote(...)
  
  ── 20. Error: is_widecr gives TRUE when extra names have 'score'/'player' (#2) (
  'where' must be an environment
  Backtrace:
    1. testthat::expect_true(is_widecr(input_1))
    4. comperes::is_widecr(input_1)
   10. tidyr::extract(...)
   13. ellipsis::check_dots_used()
   15. ellipsis:::exit_handler(action)
   16. base::bquote(...)
  
  ── 21. Error: as_widecr.default handles simple repairing (@test-results-widecr.R
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_widecr.default(input_1, repair = TRUE)
    6. comperes:::repair_widecr(res, ...)
    4. tibble::tibble(original_lower = tolower(colnames(cr_data)))
   11. tidyr::extract(...)
   15. ellipsis::check_dots_used()
   17. ellipsis:::exit_handler(action)
   18. base::bquote(...)
  
  ── 22. Error: as_widecr.default throws an error if no column is matched (@test-r
  'where' must be an environment
  Backtrace:
    1. testthat::expect_warning(...)
    7. comperes:::as_widecr.default(input_bad_colnames, repair = TRUE)
    8. comperes:::repair_widecr(res, ...)
    4. tibble::tibble(original_lower = tolower(colnames(cr_data)))
   11. tidyr::extract(...)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  ── 23. Error: as_widecr.default places column 'game' on first place (@test-resul
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_widecr.default(input_game_col, repair = TRUE)
    6. comperes:::repair_widecr(res, ...)
    4. tibble::tibble(original_lower = tolower(colnames(cr_data)))
   11. tidyr::extract(...)
   15. ellipsis::check_dots_used()
   17. ellipsis:::exit_handler(action)
   18. base::bquote(...)
  
  ── 24. Error: as_widecr.default correctly renames many columns (@test-results-wi
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    7. comperes:::as_widecr.default(input_2, repair = TRUE)
    8. comperes:::repair_widecr(res, ...)
    9. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   18. ellipsis::check_dots_used()
   20. ellipsis:::exit_handler(action)
   21. base::bquote(...)
  
  ── 25. Error: as_widecr.default works properly on good inputs (@test-results-wid
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_widecr.default(input_good, repair = TRUE)
    6. comperes:::repair_widecr(res, ...)
    7. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   16. ellipsis::check_dots_used()
   18. ellipsis:::exit_handler(action)
   19. base::bquote(...)
  
  ── 26. Error: as_widecr.default preserves column types (@test-results-widecr.R#1
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_widecr.default(input_types1, repair = TRUE)
    6. comperes:::repair_widecr(res, ...)
    7. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   16. ellipsis::check_dots_used()
   18. ellipsis:::exit_handler(action)
   19. base::bquote(...)
  
  ── 27. Error: as_widecr.default handles extra arguments (@test-results-widecr.R#
  'where' must be an environment
  Backtrace:
    1. testthat::expect_silent(...)
   10. comperes:::as_widecr.default(input_good, repair = TRUE, extraArg = 1)
   11. comperes:::repair_widecr(res, ...)
   12. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  ── 28. Error: as_widecr.longcr does simple converting (@test-results-widecr.R#26
  'where' must be an environment
  Backtrace:
    1. comperes::as_widecr(input_longcr)
    2. comperes:::as_widecr.longcr(input_longcr)
    3. comperes:::repair_widecr(res)
    4. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   13. ellipsis::check_dots_used()
   15. ellipsis:::exit_handler(action)
   16. base::bquote(...)
  
  ── 29. Error: as_widecr.longcr correctly renames many columns (@test-results-wid
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    7. comperes:::as_widecr.longcr(input_many_pairs, repair = TRUE)
    8. comperes:::repair_widecr(res)
    9. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   18. ellipsis::check_dots_used()
   20. ellipsis:::exit_handler(action)
   21. base::bquote(...)
  
  ── 30. Error: as_widecr.longcr preserves column types (@test-results-widecr.R#31
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(...)
    5. comperes:::as_widecr.longcr(input_types1, repair = TRUE)
    6. comperes:::repair_widecr(res)
    7. comperes::is_widecr(cr_data)
   12. tidyr::extract(...)
   16. ellipsis::check_dots_used()
   18. ellipsis:::exit_handler(action)
   19. base::bquote(...)
  
  ── 31. Error: as_widecr.widecr works (@test-results-widecr.R#363)  ─────────────
  'where' must be an environment
  Backtrace:
    1. comperes::as_widecr(input_1, repair = TRUE)
    2. comperes:::as_widecr.default(input_1, repair = TRUE)
    3. comperes:::repair_widecr(res, ...)
    4. tibble::tibble(original_lower = tolower(colnames(cr_data)))
   11. tidyr::extract(...)
   12. ellipsis::check_dots_used()
   14. ellipsis:::exit_handler(action)
   15. base::bquote(...)
  
  ── 32. Error: repair_widecr works (@test-results-widecr.R#377)  ────────────────
  'where' must be an environment
  Backtrace:
    1. testthat::expect_identical(repair_widecr(input), input)
    4. comperes:::repair_widecr(input)
    5. comperes::is_widecr(cr_data)
   11. tidyr::extract(...)
   14. ellipsis::check_dots_used()
   16. ellipsis:::exit_handler(action)
   17. base::bquote(...)
  
  ── 33. Error: get_matchups works (@test-utils.R#168)  ──────────────────────────
  'where' must be an environment
  Backtrace:
    1. comperes::get_matchups(cr_data)
    2. dplyr::left_join(...)
   10. comperes::as_widecr(.)
   12. comperes:::repair_widecr(res, ...)
   13. comperes::is_widecr(cr_data)
   13. tidyr::extract(...)
   22. ellipsis::check_dots_used()
   24. ellipsis:::exit_handler(action)
   25. base::bquote(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 195 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 33 ]
  1. Error: h2h_long works (@test-head-to-head.R#33) 
  2. Error: h2h_long handles `player` as factor (@test-head-to-head.R#52) 
  3. Error: h2h_long handles unnamed Head-to-Head functions (@test-head-to-head.R#65) 
  4. Error: h2h_long handles not NULL `fill` (@test-head-to-head.R#73) 
  5. Error: h2h_mat works (@test-head-to-head.R#122) 
  6. Error: h2h_mat handles `player` as factor (@test-head-to-head.R#149) 
  7. Error: h2h_mat allows multiple Head-to-Head functions (@test-head-to-head.R#163) 
  8. Error: h2h_mat handles not NULL `fill` (@test-head-to-head.R#180) 
  9. Error: h2h_funs can be used with !!! (@test-head-to-head.R#216) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted