Skip to content

Commit 6f0a537

Browse files
committed
fix tests
1 parent 6a6db9b commit 6f0a537

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

man/setMBOControlNoisy.Rd

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test_mbo_noisy.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ test_that("mbo works with multiple instances of noisy problems", {
1212
ctrl = setMBOControlInfill(ctrl, crit = crit.aei, opt.focussearch.points = 100L)
1313
ctrl = setMBOControlNoisy(ctrl, instances = 5L)
1414
or = mbo(fun, control = ctrl)
15-
expect_true(all(table(opdf$x) == 5)
15+
opdf = as.data.frame(or$opt.path)
16+
expect_true(all(table(opdf$x) == 5))
1617
})
1718

1819
test_that("mbo works with multiple fixed instances of noisy problems", {
@@ -30,7 +31,7 @@ test_that("mbo works with multiple fixed instances of noisy problems", {
3031
or = mbo(fun, control = ctrl)
3132
opdf = as.data.frame(or$opt.path)
3233
expect_true(all(opdf$i %in% 1:5))
33-
expect_true(all(table(opdf$x) == 5)
34+
expect_true(all(table(opdf$x) == 5))
3435
})
3536

3637
test_that("mbo works with self replicating instances of noisy problems", {
@@ -47,5 +48,5 @@ test_that("mbo works with self replicating instances of noisy problems", {
4748
or = mbo(fun, control = ctrl)
4849
opdf = as.data.frame(or$opt.path)
4950
expect_true(all(opdf$noisy.repl %in% 1:5))
50-
expect_true(all(table(opdf$x) == 5)
51+
expect_true(all(table(opdf$x) == 5))
5152
})

0 commit comments

Comments
 (0)