From d3e0755f816cdad087f58ad5f33c41d314dc20de Mon Sep 17 00:00:00 2001 From: Marc Becker <33069354+be-marc@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:35:27 +0200 Subject: [PATCH] tests: suppress warnings in autotest (#1179) --- inst/testthat/helper_autotest.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/testthat/helper_autotest.R b/inst/testthat/helper_autotest.R index 4993c35f5..377e7d152 100644 --- a/inst/testthat/helper_autotest.R +++ b/inst/testthat/helper_autotest.R @@ -316,7 +316,7 @@ run_experiment = function(task, learner, seed = NULL, configure_learner = NULL) # check train stage = "train()" - ok = try(learner$train(task), silent = TRUE) + ok = suppressWarnings(try(learner$train(task), silent = TRUE)) if (inherits(ok, "try-error")) { return(err(as.character(ok))) } @@ -327,7 +327,7 @@ run_experiment = function(task, learner, seed = NULL, configure_learner = NULL) # check predict stage = "predict()" - prediction = try(learner$predict(task), silent = TRUE) + prediction = suppressWarnings(try(learner$predict(task), silent = TRUE)) if (inherits(prediction, "try-error")) { ok = prediction prediction = NULL