Skip to content

Commit

Permalink
fix test which relies on ordering of hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg committed Aug 14, 2024
1 parent c88b6d6 commit 59a7efa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Suggests:
testthat
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
5 changes: 2 additions & 3 deletions man/reduceResultsBatchmark.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions tests/testthat/test_batchmark.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ test_that("adding parameter values works", {
expect_is(results, "BenchmarkResult")
expect_benchmark_result(results)
expect_data_table(as.data.table(results), nrow = 12L)
expect_equal(results$learners$learner[[1]]$param_set$values$x, 1)
expect_equal(results$learners$learner[[2]]$param_set$values$x, 0.5)

expect_set_equal(
map_dbl(results$learners$learner, function(x) x$param_set$values$x),
c(0.5, 1)
)
})

0 comments on commit 59a7efa

Please sign in to comment.