Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hbaniecki committed Nov 22, 2020
1 parent 2bf3575 commit 3baf4f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test_warnings_and_errors.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ 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)
)
})

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)
)
})

testthat::test_that("deprecated modelStudioOptions", {
testthat::expect_warning(
modelStudio::modelStudioOptions()
ms <- modelStudio::modelStudioOptions()
)
})

Expand All @@ -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])
)
Expand Down

0 comments on commit 3baf4f1

Please sign in to comment.