Skip to content

Commit 59f0c66

Browse files
committed
Update boost tree argument checking tests
1 parent 33a23f1 commit 59f0c66

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/testthat/test_boost_tree.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,14 @@ test_that('updating', {
121121

122122
test_that('bad input', {
123123
expect_error(boost_tree(mode = "bogus"))
124-
expect_error(boost_tree(trees = -1))
125-
expect_error(boost_tree(min_n = -10))
124+
expect_error({
125+
bt <- boost_tree(trees = -1)
126+
fit(bt, Species ~ ., iris, "xgboost")
127+
})
128+
expect_error({
129+
bt <- boost_tree(min_n = -10)
130+
fit(bt, Species ~ ., iris, "xgboost")
131+
})
126132
expect_error(translate(boost_tree(), engine = "wat?"))
127133
expect_warning(translate(boost_tree(), engine = NULL))
128134
expect_error(translate(boost_tree(formula = y ~ x)))

0 commit comments

Comments
 (0)