Running 'testthat.R' [43s/47s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > suppressPackageStartupMessages({
  +   library(testthat)
  +   library(checkmate)
  +   library(ffscrapr)
  + })
  > 
  > test_check("ffscrapr")
  == Failed tests ================================================================
  -- Error (???): Cache clearing works -------------------------------------------
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=players&DETAILS=1&JSON=1 (mfl/2021/export-96a6d5.json)
  Backtrace:
       x
    1. +-(function (conn = NULL) ...
    2. | \-`%>%`(...)
    3. +-dplyr::select(...)
    4. +-dplyr::mutate(...)
    5. +-dplyr::mutate_at(...)
    6. | \-dplyr:::manip_at(...)
    7. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
    8. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
    9. |       \-dplyr::tbl_vars(tbl)
   10. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   11. |         | \-base::structure(...)
   12. |         \-dplyr:::tbl_vars_dispatch(x)
   13. +-tidyr::unnest_wider(., 1)
   14. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   15. | \-dplyr::tbl_vars(data)
   16. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   17. |   | \-base::structure(...)
   18. |   \-dplyr:::tbl_vars_dispatch(x)
   19. +-tibble::tibble(.)
   20. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   21. |   \-rlang::eval_tidy(xs[[j]], mask)
   22. +-purrr::pluck(., "content", "players", "player")
   23. \-ffscrapr::mfl_getendpoint(., "players", DETAILS = 1)
   24.   \-ratelimitr:::fn_get(url_query, user_agent, conn$auth_cookie)
   25.     +-base::eval(as.call(nf))
   26.     | \-base::eval(as.call(nf))
   27.     \-httr:::fun(...)
   28.       \-httr:::request_perform(req, hu$handle$handle)
   29.         \-httr:::request_fetch(req$output, req$url, handle)
   30.           \-(function (req, handle, refresh) ...
   31.             \-httptest:::stop_request(req)
  -- Error (test-ff_draft.R:4:5): ff_draft returns a tibble for each platform currently programmed --
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=players&DETAILS=1&JSON=1 (mfl/2021/export-96a6d5.json)
  Backtrace:
       x
    1. +-ffscrapr::ff_draft(sfb_conn) test-ff_draft.R:4:4
    2. +-ffscrapr:::ff_draft.mfl_conn(sfb_conn)
    3. | +-ffscrapr::mfl_players()
    4. | | +-base::withVisible(eval(mc, parent.frame()))
    5. | | \-base::eval(mc, parent.frame())
    6. | |   \-base::eval(mc, parent.frame())
    7. | \-(function (conn = NULL) ...
    8. |   \-`%>%`(...)
    9. +-dplyr::select(...)
   10. +-dplyr::mutate(...)
   11. +-dplyr::mutate_at(...)
   12. | \-dplyr:::manip_at(...)
   13. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
   14. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
   15. |       \-dplyr::tbl_vars(tbl)
   16. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   17. |         | \-base::structure(...)
   18. |         \-dplyr:::tbl_vars_dispatch(x)
   19. +-tidyr::unnest_wider(., 1)
   20. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   21. | \-dplyr::tbl_vars(data)
   22. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   23. |   | \-base::structure(...)
   24. |   \-dplyr:::tbl_vars_dispatch(x)
   25. +-tibble::tibble(.)
   26. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   27. |   \-rlang::eval_tidy(xs[[j]], mask)
   28. +-purrr::pluck(., "content", "players", "player")
   29. \-ffscrapr::mfl_getendpoint(., "players", DETAILS = 1)
   30.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   31.     \-httr:::request_perform(req, hu$handle$handle)
   32.       \-httr:::request_fetch(req$output, req$url, handle)
   33.         \-(function (req, handle, refresh) ...
   34.           \-httptest:::stop_request(req)
  -- Error (???): ff_league returns a tibble for each platform currently programmed --
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=allRules&JSON=1 (mfl/2021/export-6788e2.json)
  Backtrace:
       x
    1. +-(function (conn) ...
    2. | \-tibble::tibble(...)
    3. |   \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
    4. |     \-rlang::eval_tidy(xs[[j]], mask)
    5. +-ffscrapr:::.mfl_flag_scoring(conn)
    6. | +-ffscrapr::ff_scoring(conn)
    7. | +-ffscrapr:::ff_scoring.mfl_conn(conn)
    8. | | +-base::withVisible(eval(mc, parent.frame()))
    9. | | \-base::eval(mc, parent.frame())
   10. | |   \-base::eval(mc, parent.frame())
   11. | \-(function (conn) ...
   12. |   \-`%>%`(...)
   13. +-dplyr::select(...)
   14. +-dplyr::mutate(...)
   15. +-dplyr::mutate_at(., c("is_player", "is_team", "is_coach"), ~as.logical(as.numeric(.x)))
   16. | \-dplyr:::manip_at(...)
   17. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
   18. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
   19. |       \-dplyr::tbl_vars(tbl)
   20. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   21. |         | \-base::structure(...)
   22. |         \-dplyr:::tbl_vars_dispatch(x)
   23. +-dplyr::left_join(., mfl_allrules(), by = c(event = "abbrev"))
   24. +-dplyr:::left_join.data.frame(., mfl_allrules(), by = c(event = "abbrev"))
   25. | \-dplyr::auto_copy(x, y, copy = copy)
   26. |   +-dplyr::same_src(x, y)
   27. |   \-dplyr:::same_src.data.frame(x, y)
   28. |     \-base::is.data.frame(y)
   29. +-ffscrapr:::mfl_allrules()
   30. | +-base::withVisible(eval(mc, parent.frame()))
   31. | \-base::eval(mc, parent.frame())
   32. |   \-base::eval(mc, parent.frame())
   33. |     \-(function () ...
   34. |       \-`%>%`(...)
   35. +-dplyr::select(...)
   36. +-dplyr::mutate_all(., as.character)
   37. | \-dplyr:::check_grouped(.tbl, "mutate", "all", alt = TRUE)
   38. |   \-dplyr::is_grouped_df(tbl)
   39. +-dplyr::as_tibble(.)
   40. +-purrr::map_depth(., 2, `[[`, 1)
   41. | \-purrr:::map_depth_rec(...)
   42. |   \-rlang::is_atomic(.x)
   43. +-purrr::map_depth(., -2, unname, 1, .ragged = TRUE)
   44. | \-purrr::vec_depth(.x)
   45. +-tidyr::unnest_wider(., 1)
   46. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   47. | \-dplyr::tbl_vars(data)
   48. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   49. |   | \-base::structure(...)
   50. |   \-dplyr:::tbl_vars_dispatch(x)
   51. +-tibble::tibble(.)
   52. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   53. |   \-rlang::eval_tidy(xs[[j]], mask)
   54. +-purrr::pluck(., "content", "allRules", "rule")
   55. \-ffscrapr::mfl_getendpoint(., "allRules")
   56.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   57.     \-httr:::request_perform(req, hu$handle$handle)
   58.       \-httr:::request_fetch(req$output, req$url, handle)
   59.         \-(function (req, handle, refresh) ...
   60.           \-httptest:::stop_request(req)
  -- Error (???): ff_playerscores returns a tibble of player scores --------------
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=players&DETAILS=1&JSON=1 (mfl/2021/export-96a6d5.json)
  Backtrace:
       x
    1. +-(function (conn, season, week, ...) ...
    2. | \-`%>%`(...)
    3. +-dplyr::select(...)
    4. +-dplyr::mutate(., season = season, week = week)
    5. +-dplyr::left_join(...)
    6. +-dplyr:::left_join.data.frame(...)
    7. | \-dplyr::auto_copy(x, y, copy = copy)
    8. |   +-dplyr::same_src(x, y)
    9. |   \-dplyr:::same_src.data.frame(x, y)
   10. |     \-base::is.data.frame(y)
   11. +-dplyr::select(...)
   12. +-ffscrapr::mfl_players()
   13. | +-base::withVisible(eval(mc, parent.frame()))
   14. | \-base::eval(mc, parent.frame())
   15. |   \-base::eval(mc, parent.frame())
   16. |     \-(function (conn = NULL) ...
   17. |       \-`%>%`(...)
   18. +-dplyr::select(...)
   19. +-dplyr::mutate(...)
   20. +-dplyr::mutate_at(...)
   21. | \-dplyr:::manip_at(...)
   22. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
   23. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
   24. |       \-dplyr::tbl_vars(tbl)
   25. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   26. |         | \-base::structure(...)
   27. |         \-dplyr:::tbl_vars_dispatch(x)
   28. +-tidyr::unnest_wider(., 1)
   29. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   30. | \-dplyr::tbl_vars(data)
   31. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   32. |   | \-base::structure(...)
   33. |   \-dplyr:::tbl_vars_dispatch(x)
   34. +-tibble::tibble(.)
   35. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   36. |   \-rlang::eval_tidy(xs[[j]], mask)
   37. +-purrr::pluck(., "content", "players", "player")
   38. \-ffscrapr::mfl_getendpoint(., "players", DETAILS = 1)
   39.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   40.     \-httr:::request_perform(req, hu$handle$handle)
   41.       \-httr:::request_fetch(req$output, req$url, handle)
   42.         \-(function (req, handle, refresh) ...
   43.           \-httptest:::stop_request(req)
  -- Error (test-ff_rosters.R:4:5): ff_rosters returns a tibble ------------------
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=players&DETAILS=1&JSON=1 (mfl/2021/export-96a6d5.json)
  Backtrace:
       x
    1. +-ffscrapr::ff_rosters(ssb) test-ff_rosters.R:4:4
    2. +-ffscrapr:::ff_rosters.mfl_conn(ssb)
    3. | +-ffscrapr::mfl_players()
    4. | | +-base::withVisible(eval(mc, parent.frame()))
    5. | | \-base::eval(mc, parent.frame())
    6. | |   \-base::eval(mc, parent.frame())
    7. | \-(function (conn = NULL) ...
    8. |   \-`%>%`(...)
    9. +-dplyr::select(...)
   10. +-dplyr::mutate(...)
   11. +-dplyr::mutate_at(...)
   12. | \-dplyr:::manip_at(...)
   13. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
   14. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
   15. |       \-dplyr::tbl_vars(tbl)
   16. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   17. |         | \-base::structure(...)
   18. |         \-dplyr:::tbl_vars_dispatch(x)
   19. +-tidyr::unnest_wider(., 1)
   20. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   21. | \-dplyr::tbl_vars(data)
   22. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   23. |   | \-base::structure(...)
   24. |   \-dplyr:::tbl_vars_dispatch(x)
   25. +-tibble::tibble(.)
   26. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   27. |   \-rlang::eval_tidy(xs[[j]], mask)
   28. +-purrr::pluck(., "content", "players", "player")
   29. \-ffscrapr::mfl_getendpoint(., "players", DETAILS = 1)
   30.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   31.     \-httr:::request_perform(req, hu$handle$handle)
   32.       \-httr:::request_fetch(req$output, req$url, handle)
   33.         \-(function (req, handle, refresh) ...
   34.           \-httptest:::stop_request(req)
  -- Error (???): ff_scoring returns a tibble ------------------------------------
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=allRules&JSON=1 (mfl/2021/export-6788e2.json)
  Backtrace:
       x
    1. +-(function (conn) ...
    2. | \-`%>%`(...)
    3. +-dplyr::select(...)
    4. +-dplyr::mutate(...)
    5. +-dplyr::mutate_at(., c("is_player", "is_team", "is_coach"), ~as.logical(as.numeric(.x)))
    6. | \-dplyr:::manip_at(...)
    7. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
    8. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
    9. |       \-dplyr::tbl_vars(tbl)
   10. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   11. |         | \-base::structure(...)
   12. |         \-dplyr:::tbl_vars_dispatch(x)
   13. +-dplyr::left_join(., mfl_allrules(), by = c(event = "abbrev"))
   14. +-dplyr:::left_join.data.frame(., mfl_allrules(), by = c(event = "abbrev"))
   15. | \-dplyr::auto_copy(x, y, copy = copy)
   16. |   +-dplyr::same_src(x, y)
   17. |   \-dplyr:::same_src.data.frame(x, y)
   18. |     \-base::is.data.frame(y)
   19. +-ffscrapr:::mfl_allrules()
   20. | +-base::withVisible(eval(mc, parent.frame()))
   21. | \-base::eval(mc, parent.frame())
   22. |   \-base::eval(mc, parent.frame())
   23. |     \-(function () ...
   24. |       \-`%>%`(...)
   25. +-dplyr::select(...)
   26. +-dplyr::mutate_all(., as.character)
   27. | \-dplyr:::check_grouped(.tbl, "mutate", "all", alt = TRUE)
   28. |   \-dplyr::is_grouped_df(tbl)
   29. +-dplyr::as_tibble(.)
   30. +-purrr::map_depth(., 2, `[[`, 1)
   31. | \-purrr:::map_depth_rec(...)
   32. |   \-rlang::is_atomic(.x)
   33. +-purrr::map_depth(., -2, unname, 1, .ragged = TRUE)
   34. | \-purrr::vec_depth(.x)
   35. +-tidyr::unnest_wider(., 1)
   36. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   37. | \-dplyr::tbl_vars(data)
   38. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   39. |   | \-base::structure(...)
   40. |   \-dplyr:::tbl_vars_dispatch(x)
   41. +-tibble::tibble(.)
   42. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   43. |   \-rlang::eval_tidy(xs[[j]], mask)
   44. +-purrr::pluck(., "content", "allRules", "rule")
   45. \-ffscrapr::mfl_getendpoint(., "allRules")
   46.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   47.     \-httr:::request_perform(req, hu$handle$handle)
   48.       \-httr:::request_fetch(req$output, req$url, handle)
   49.         \-(function (req, handle, refresh) ...
   50.           \-httptest:::stop_request(req)
  -- Error (test-ff_transactions.R:4:5): ff_transactions returns a tibble of transactions --
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=players&DETAILS=1&JSON=1 (mfl/2021/export-96a6d5.json)
  Backtrace:
       x
    1. +-ffscrapr::ff_transactions(ssb) test-ff_transactions.R:4:4
    2. +-ffscrapr:::ff_transactions.mfl_conn(ssb)
    3. | +-ffscrapr::mfl_players()
    4. | | +-base::withVisible(eval(mc, parent.frame()))
    5. | | \-base::eval(mc, parent.frame())
    6. | |   \-base::eval(mc, parent.frame())
    7. | \-(function (conn = NULL) ...
    8. |   \-`%>%`(...)
    9. +-dplyr::select(...)
   10. +-dplyr::mutate(...)
   11. +-dplyr::mutate_at(...)
   12. | \-dplyr:::manip_at(...)
   13. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
   14. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
   15. |       \-dplyr::tbl_vars(tbl)
   16. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   17. |         | \-base::structure(...)
   18. |         \-dplyr:::tbl_vars_dispatch(x)
   19. +-tidyr::unnest_wider(., 1)
   20. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   21. | \-dplyr::tbl_vars(data)
   22. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   23. |   | \-base::structure(...)
   24. |   \-dplyr:::tbl_vars_dispatch(x)
   25. +-tibble::tibble(.)
   26. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   27. |   \-rlang::eval_tidy(xs[[j]], mask)
   28. +-purrr::pluck(., "content", "players", "player")
   29. \-ffscrapr::mfl_getendpoint(., "players", DETAILS = 1)
   30.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   31.     \-httr:::request_perform(req, hu$handle$handle)
   32.       \-httr:::request_fetch(req$output, req$url, handle)
   33.         \-(function (req, handle, refresh) ...
   34.           \-httptest:::stop_request(req)
  -- Error (???): ff_playersish calls return a tibble ----------------------------
  Error: GET https://api.myfantasyleague.com/2021/export?TYPE=players&DETAILS=1&JSON=1 (mfl/2021/export-96a6d5.json)
  Backtrace:
       x
    1. +-(function (conn = NULL) ...
    2. | \-`%>%`(...)
    3. +-dplyr::select(...)
    4. +-dplyr::mutate(...)
    5. +-dplyr::mutate_at(...)
    6. | \-dplyr:::manip_at(...)
    7. |   \-dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
    8. |     \-dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
    9. |       \-dplyr::tbl_vars(tbl)
   10. |         +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   11. |         | \-base::structure(...)
   12. |         \-dplyr:::tbl_vars_dispatch(x)
   13. +-tidyr::unnest_wider(., 1)
   14. | +-tidyselect::vars_pull(tbl_vars(data), !!enquo(col))
   15. | \-dplyr::tbl_vars(data)
   16. |   +-dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   17. |   | \-base::structure(...)
   18. |   \-dplyr:::tbl_vars_dispatch(x)
   19. +-tibble::tibble(.)
   20. | \-tibble:::tibble_quos(xs[!is.null], .rows, .name_repair)
   21. |   \-rlang::eval_tidy(xs[[j]], mask)
   22. +-purrr::pluck(., "content", "players", "player")
   23. \-ffscrapr::mfl_getendpoint(., "players", DETAILS = 1)
   24.   \-httr:::fn_get(url_query, user_agent, conn$auth_cookie)
   25.     \-httr:::request_perform(req, hu$handle$handle)
   26.       \-httr:::request_fetch(req$output, req$url, handle)
   27.         \-(function (req, handle, refresh) ...
   28.           \-httptest:::stop_request(req)
  
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 64 ]
  Error: Test failures
  Execution halted