@@ -12,10 +12,12 @@ testthat::test_that("new_observation as list", {
1212
1313if (requireNamespace(" xgboost" , quietly = TRUE )) {
1414 testthat :: test_that(" check_single_prediction error" , {
15- testthat :: expect_error(
16- ms <- modelStudio :: modelStudio(explainer_xgb ,
17- new_observation = model_matrix_train [1 ,],
18- show_info = v , B = 3 )
15+ testthat :: expect_warning(
16+ testthat :: expect_error(
17+ ms <- modelStudio :: modelStudio(explainer_xgb ,
18+ new_observation = model_matrix_train [1 ,],
19+ show_info = v , B = 3 )
20+ )
1921 )
2022 })
2123}
@@ -37,8 +39,8 @@ testthat::test_that("removed modelStudioOptions", {
3739if (requireNamespace(" ranger" , quietly = TRUE )) {
3840 ms <- modelStudio :: modelStudio(explain_rf , apartments [1 : 2 ,], N = 5 , B = 2 , show_info = v )
3941 new_ms <- modelStudio :: ms_update_observations(ms , explain_rf , B = 2 , show_info = v ,
40- new_observation = apartments [1 ,],
41- new_observation_y = apartments $ m2.price [1 ])
42+ new_observation = apartments [3 ,],
43+ new_observation_y = apartments $ m2.price [3 ])
4244
4345 testthat :: test_that(" duplicated ids" , {
4446 testthat :: expect_is(new_ms , " modelStudio" )
0 commit comments