tests/testthat/test-bart_wbb.R

test_that("bart_wbb_ratings() returns a women's T-Rank table", {
  skip_on_cran()
  skip_on_ci()
  if (Sys.getenv("TORVIK_TESTS") != "1") skip("TORVIK_TESTS not set")
  df <- bart_wbb_ratings(2024)
  skip_if(nrow(df) == 0, "bart_wbb_ratings() returned 0 rows at test time")
  expect_s3_class(df, "wehoop_data")
  expect_true(all(c("team", "conf", "barthag", "year") %in% names(df)))
  expect_gt(nrow(df), 300)
})

test_that("bart_wbb_game_schedule() returns a women's season schedule", {
  skip_on_cran()
  skip_on_ci()
  if (Sys.getenv("TORVIK_TESTS") != "1") skip("TORVIK_TESTS not set")
  df <- bart_wbb_game_schedule(2024)
  skip_if(nrow(df) == 0, "bart_wbb_game_schedule() returned 0 rows at test time")
  expect_s3_class(df, "wehoop_data")
  expect_true(all(c("team1", "team2", "year") %in% names(df)))
  expect_gt(nrow(df), 1000)
})

Try the wehoop package in your browser

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

wehoop documentation built on Aug. 25, 2026, 1:06 a.m.