diff --git a/tests/testthat/test_warnings_and_errors.R b/tests/testthat/test_warnings_and_errors.R index f103997..fe4a57b 100644 --- a/tests/testthat/test_warnings_and_errors.R +++ b/tests/testthat/test_warnings_and_errors.R @@ -4,7 +4,7 @@ source("test_objects.R") testthat::test_that("new_observation as list", { testthat::expect_warning( - modelStudio::modelStudio(explain_glm, + ms <- modelStudio::modelStudio(explain_glm, new_observation = as.list(titanic_test[1,-9]), show_info = v, B = 3) ) @@ -12,7 +12,7 @@ testthat::test_that("new_observation as list", { testthat::test_that("check_single_prediction error", { testthat::expect_error( - modelStudio::modelStudio(explainer_xgb, + ms <- modelStudio::modelStudio(explainer_xgb, new_observation = model_matrix_train[1,], show_info = v, B = 3) ) @@ -20,7 +20,7 @@ testthat::test_that("check_single_prediction error", { testthat::test_that("deprecated modelStudioOptions", { testthat::expect_warning( - modelStudio::modelStudioOptions() + ms <- modelStudio::modelStudioOptions() ) }) @@ -32,7 +32,7 @@ new_ms <- modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info = testthat::test_that("duplicated ids", { testthat::expect_is(new_ms, "modelStudio") testthat::expect_warning( - modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info = v, + ms <- modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info = v, new_observation = apartments[1,], new_observation_y = apartments$m2.price[1]) )