Skip to content

Commit 3baf4f1

Browse files
committed
update tests
1 parent 2bf3575 commit 3baf4f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/testthat/test_warnings_and_errors.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ source("test_objects.R")
44

55
testthat::test_that("new_observation as list", {
66
testthat::expect_warning(
7-
modelStudio::modelStudio(explain_glm,
7+
ms <- modelStudio::modelStudio(explain_glm,
88
new_observation = as.list(titanic_test[1,-9]),
99
show_info = v, B = 3)
1010
)
1111
})
1212

1313
testthat::test_that("check_single_prediction error", {
1414
testthat::expect_error(
15-
modelStudio::modelStudio(explainer_xgb,
15+
ms <- modelStudio::modelStudio(explainer_xgb,
1616
new_observation = model_matrix_train[1,],
1717
show_info = v, B = 3)
1818
)
1919
})
2020

2121
testthat::test_that("deprecated modelStudioOptions", {
2222
testthat::expect_warning(
23-
modelStudio::modelStudioOptions()
23+
ms <- modelStudio::modelStudioOptions()
2424
)
2525
})
2626

@@ -32,7 +32,7 @@ new_ms <- modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info =
3232
testthat::test_that("duplicated ids", {
3333
testthat::expect_is(new_ms, "modelStudio")
3434
testthat::expect_warning(
35-
modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info = v,
35+
ms <- modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info = v,
3636
new_observation = apartments[1,],
3737
new_observation_y = apartments$m2.price[1])
3838
)

0 commit comments

Comments
 (0)