Skip to content

Commit

Permalink
skip tests if r2dii.data outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoffa committed Mar 12, 2024
1 parent f16334d commit e8d98d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions tests/testthat/test-match_name.R
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ test_that("allows custom `sector_classifications` via options() (#354)", {
})

test_that("with `join_id`, joins as expected (#135)", {

skip_if_r2dii_data_outdated()
loanbook <- fake_lbk(
name_direct_loantaker = "DL won't fuzzy match",
name_ultimate_parent = "UP won't fuzzy match",
Expand All @@ -748,7 +748,7 @@ test_that("with `join_id`, joins as expected (#135)", {
})

test_that("with `join_id` accepts list input indicating different cols (#135)", {

skip_if_r2dii_data_outdated()
loanbook <- fake_lbk(
name_direct_loantaker = "DL won't fuzzy match",
name_ultimate_parent = "UP won't fuzzy match",
Expand All @@ -772,7 +772,7 @@ test_that("with `join_id` accepts list input indicating different cols (#135)",
})

test_that("with `join_id`, outputs data with loanbook join column (#135)", {

skip_if_r2dii_data_outdated()
# with `join_id` as character
out <- match_name(
fake_lbk(foo = "1"),
Expand All @@ -794,7 +794,7 @@ test_that("with `join_id`, outputs data with loanbook join column (#135)", {
})

test_that("with `join_id` and multiple matches, prefers ID (#135)", {

skip_if_r2dii_data_outdated()
# loanbook might match at UP
loanbook <- fake_lbk(
name_direct_loantaker = "DL won't fuzzy match",
Expand All @@ -819,8 +819,7 @@ test_that("with `join_id` and multiple matches, prefers ID (#135)", {
})

test_that("with `join_id` and one ID match, one fuzzy match, outputs as expected (#135)", {


skip_if_r2dii_data_outdated()
loanbook <- fake_lbk(
id_loan = c("L1", "L2"), # L1 should ID match, L2 should fuzzy match
name_direct_loantaker = "DL won't fuzzy match",
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-prioritize.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ test_that("with 0-row input returns 0-row input", {
expect_no_error(prioritize(zero_row))
})

test_that("with `join_id`, outputs as expected", {
test_that("with `match_name` with `join_id`, outputs as expected (#135)", {
skip_if_r2dii_data_outdated()
lbk <- fake_lbk(id_loan = "L1", id_col = "1")
abcd <- fake_abcd(id_col = "1")
matched <- match_name(lbk, abcd, join_id = "id_col")
Expand Down

0 comments on commit e8d98d2

Please sign in to comment.