Skip to content

Commit

Permalink
update var names in test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyelhabr committed Jan 17, 2024
1 parent 912875a commit 35888ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-fbref.R
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,16 @@ test_that("fb_league_stats() for players works", {
testthat::skip_on_cran()
testthat::skip_on_ci()
expected_player_shooting_cols <- c("Rk", "Player", "Player_Href", "Nation", "Pos", "Squad", "Age", "Born", "Mins_Per_90", "Gls_Standard", "Sh_Standard", "SoT_Standard", "SoT_percent_Standard", "Sh_per_90_Standard", "SoT_per_90_Standard", "G_per_Sh_Standard", "G_per_SoT_Standard", "Dist_Standard", "FK_Standard", "PK_Standard", "PKatt_Standard", "xG_Expected", "npxG_Expected", "npxG_per_Sh_Expected", "G_minus_xG_Expected", "np:G_minus_xG_Expected", "Matches", "url")
epl_player_shooting_22 <- fb_league_stats(
single_player_shooting_22 <- fb_league_stats(
country = "BRA",
gender = "M",
season_end_year = 2022,
tier = "1st",
stat_type = "shooting",
team_or_player = "player"
)
expect_gt(nrow(epl_player_shooting_22), 0)
expect_setequal(colnames(epl_player_shooting_22), expected_player_shooting_cols)
expect_gt(nrow(single_player_shooting_22), 0)
expect_setequal(colnames(single_player_shooting_22), expected_player_shooting_cols)

expected_player_misc_cols <- c("Rk", "Player", "Player_Href", "Nation", "Pos", "Squad", "Age", "Born", "Mins_Per_90", "CrdY", "CrdR", "2CrdY", "Fls", "Fld", "Off", "Crs", "Int", "TklW", "PKwon", "PKcon", "OG", "Recov", "Won_Aerial Duels", "Lost_Aerial Duels", "Won_percent_Aerial Duels", "Matches", "url")
## testing a lot would take too long, so just test multiple years since that is the most likely input param to have multiple values
Expand Down

0 comments on commit 35888ec

Please sign in to comment.