Skip to content

Commit

Permalink
account for some warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s committed Sep 1, 2022
1 parent 1d32d42 commit a626a4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
- { os: ubuntu-latest, r: "release", pkgdown: "true" }

env:
# [Custom env var] fake virtual display for rgl package
DISPLAY: ":99"
# make sure to run `tic::use_ghactions_deploy()` to set up deployment
TIC_DEPLOY_KEY: ${{ secrets.TIC_DEPLOY_KEY }}
# prevent rgl issues because no X11 display is available
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_makeMBOLearner.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test_that("makeMBOLearner", {
lrn = makeMBOLearner(ctrl, f)
expect_equal(lrn, makeLearner("regr.km", predict.type = "se",
par.vals = list(covtype = "matern3_2", optim.method = "gen", nugget.estim = TRUE, jitter = TRUE )))
expect_output(print(mbo(f, control = ctrl, learner = lrn)), "Recommended parameters")
expect_output(suppressWarnings(print(mbo(f, control = ctrl, learner = lrn)), "Recommended parameters"))


# discrete case
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test_plot_MBOResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test_that("plot single-objective", {
opt.focussearch.maxit = 3L)
or = mbo(f, des, learner = learner, control = ctrl)

plot(or, iters = 0:2, pause = FALSE)
suppressWarnings(plot(or, iters = 0:2, pause = FALSE))
})

test_that("plot multi-objective", {
Expand All @@ -30,5 +30,5 @@ test_that("plot multi-objective", {
ctrl = setMBOControlMultiObj(ctrl, method = "mspot")
or = mbo(f, des, learner = learner, control = ctrl)

plot(or, iters = 0:2, pause = FALSE)
suppressWarnings(plot(or, iters = 0:2, pause = FALSE))
})

0 comments on commit a626a4d

Please sign in to comment.