tests/testthat/test-kp_pomeroy_ratings.R

test_that("KP - Get Pomeroy ratings", {
  skip_on_cran()
  skip_on_ci()
  skip_kenpom_test()

  x <- kp_pomeroy_ratings(min_year = 2020, max_year = 2020)

  cols <- c(
    "year",
    "rk",
    "team",
    "conf",
    "w_l",
    "adj_em",
    "adj_o",
    "adj_o_rk",
    "adj_d",
    "adj_d_rk",
    "adj_t",
    "adj_t_rk",
    "luck",
    "luck_rk",
    "sos_adj_em",
    "sos_adj_em_rk",
    "sos_opp_o",
    "sos_opp_o_rk",
    "sos_opp_d",
    "sos_opp_d_rk",
    "ncsos_adj_em",
    "ncsos_adj_em_rk",
    "ncaa_seed"
  )

  expect_equal(colnames(x), cols)
  expect_s3_class(x, "data.frame")

  Sys.sleep(3)

})

Try the hoopR package in your browser

Any scripts or data that you put into this service are public.

hoopR documentation built on Nov. 26, 2023, 1:07 a.m.