Skip to content

Commit

Permalink
upkeep: bump r2dii version in helper-skip_if_r2dii_data_outdated.R (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoffa authored Apr 25, 2024
1 parent c97f9dc commit cef463a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/helper-skip_if_r2dii_data_outdated.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
skip_if_r2dii_data_outdated <- function() {
skip_if(
packageVersion("r2dii.data") <= "0.4.1",
packageVersion("r2dii.data") <= "0.5.0",
"We expect different output"
)
}
8 changes: 8 additions & 0 deletions tests/testthat/test-match_name.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ test_that("w/ row 1 of loanbook and crucial cols yields expected", {
})

test_that("w/ 1 row of full loanbook_demo yields expected names", {
skip_if_r2dii_data_outdated()

out <- suppressWarnings(match_name(slice(loanbook_demo, 1L), fake_abcd()))
expect_equal(names(out), expect_names_match_name)
})
Expand All @@ -141,6 +143,8 @@ test_that("takes unprepared loanbook and abcd datasets", {
})

test_that("w/ loanbook that matches nothing, yields expected", {
skip_if_r2dii_data_outdated()

# Matches zero row ...
lbk2 <- slice(loanbook_demo, 2)
lbk2 <- mutate(
Expand All @@ -162,6 +166,8 @@ test_that("w/ loanbook that matches nothing, yields expected", {
})

test_that("w/ 2 lbk rows matching 2 abcd rows, yields expected names", {
skip_if_r2dii_data_outdated()

# Slice 5 once was problematic (#85)
lbk45 <- slice(loanbook_demo, 4:5)
expect_named(
Expand All @@ -171,6 +177,8 @@ test_that("w/ 2 lbk rows matching 2 abcd rows, yields expected names", {
})

test_that("w/ 1 lbk row matching ultimate, yields expected names", {
skip_if_r2dii_data_outdated()

lbk1 <- slice(loanbook_demo, 1)

expect_named(
Expand Down

0 comments on commit cef463a

Please sign in to comment.