@@ -13,7 +13,6 @@ test_that('updating', {
1313test_that(' bad input' , {
1414 expect_snapshot(error = TRUE , boost_tree(mode = " bogus" ))
1515 expect_snapshot(translate(boost_tree(mode = " classification" ), engine = NULL ))
16- expect_snapshot(error = TRUE , translate(boost_tree(formula = y ~ x )))
1716})
1817
1918
@@ -49,20 +48,20 @@ test_that('boost_tree can be fit with 1 predictor if validation is used', {
4948
5049test_that(" check_args() works" , {
5150 skip_if_not_installed(" xgboost" )
52-
51+
5352 expect_snapshot(
5453 error = TRUE ,
5554 {
56- spec <- boost_tree(trees = - 1 ) %> %
57- set_engine(" xgboost" ) %> %
55+ spec <- boost_tree(trees = - 1 ) %> %
56+ set_engine(" xgboost" ) %> %
5857 set_mode(" classification" )
5958 fit(spec , class ~ . , hpc )
6059 }
6160 )
6261 expect_snapshot(
6362 error = TRUE ,
6463 {
65- spec <- boost_tree(sample_size = - 10 ) %> %
64+ spec <- boost_tree(sample_size = - 10 ) %> %
6665 set_engine(" xgboost" ) %> %
6766 set_mode(" classification" )
6867 fit(spec , class ~ . , hpc )
@@ -71,7 +70,7 @@ test_that("check_args() works", {
7170 expect_snapshot(
7271 error = TRUE ,
7372 {
74- spec <- boost_tree(tree_depth = - 10 ) %> %
73+ spec <- boost_tree(tree_depth = - 10 ) %> %
7574 set_engine(" xgboost" ) %> %
7675 set_mode(" classification" )
7776 fit(spec , class ~ . , hpc )
@@ -80,7 +79,7 @@ test_that("check_args() works", {
8079 expect_snapshot(
8180 error = TRUE ,
8281 {
83- spec <- boost_tree(min_n = - 10 ) %> %
82+ spec <- boost_tree(min_n = - 10 ) %> %
8483 set_engine(" xgboost" ) %> %
8584 set_mode(" classification" )
8685 fit(spec , class ~ . , hpc )
0 commit comments