diff --git a/tests/testthat/test_GraphLearner.R b/tests/testthat/test_GraphLearner.R index 38afa699d..631aec822 100644 --- a/tests/testthat/test_GraphLearner.R +++ b/tests/testthat/test_GraphLearner.R @@ -573,6 +573,7 @@ test_that("marshal", { task = tsk("iris") glrn = as_learner(as_graph(lrn("classif.debug"))) glrn$train(task) + p1 = glrn$predict(task) glrn$marshal() expect_true(glrn$marshaled) expect_true(is_marshaled_model(glrn$state$model$marshaled$classif.debug)) @@ -581,7 +582,8 @@ test_that("marshal", { expect_class(glrn$model, "graph_learner_model") expect_false(is_marshaled_model(glrn$state$model$marshaled$classif.debug$model)) - glrn$predict(task) + p2 = glrn$predict(task) + expect_equal(p1$response, p2$response) # checks that it is marshalable glrn$train(task)