Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust message wording test #862

Merged
merged 7 commits into from
Jul 20, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/testthat/test-utils_data_handling.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ test_that("quantile_to_interval_dataframe() works", {
quantile[c(1, 3, 11, 13), c("observed", "predicted", "quantile_level") := NA]
# in this instance, a problem appears because there is an NA value both
# for the upper and lower bound.
expect_message(

expect_warning(
nikosbosse marked this conversation as resolved.
Show resolved Hide resolved
quantile_to_interval(
quantile,
keep_quantile_col = FALSE,
format = "wide"
),
"Aggregate function missing, defaulting to 'length'"
"[Aa]ggregate.*default.*length" # the exact message differs for data.table before/after v1.16.0
)
quantile <- quantile[-c(1, 3), ]
wide2 <- scoringutils:::quantile_to_interval(
Expand Down
Loading