TST: Added test for dump
This commit is contained in:
parent
339a53d9d4
commit
78afd6c772
17
R-package/tests/testthat/test_helpers.R
Normal file
17
R-package/tests/testthat/test_helpers.R
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
context('Test helper functions')
|
||||||
|
|
||||||
|
require(xgboost)
|
||||||
|
|
||||||
|
data(agaricus.train, package='xgboost')
|
||||||
|
data(agaricus.test, package='xgboost')
|
||||||
|
train <- agaricus.train
|
||||||
|
test <- agaricus.test
|
||||||
|
|
||||||
|
bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
|
||||||
|
eta = 1, nthread = 2, nround = 2,objective = "binary:logistic")
|
||||||
|
|
||||||
|
test_that("dump works", {
|
||||||
|
capture.output(print(xgb.dump(bst)))
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user