Unverified Commit 3ed0027b authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] add assertions to test on lightgbm() weights (#5110)

parent 60244e4a
......@@ -2941,6 +2941,7 @@ test_that("lightgbm() accepts 'weight' and 'weights'", {
, nrounds = 5L
, verbose = -1L
)
expect_equal(model$.__enclos_env__$private$train_set$get_field("weight"), w)
# Avoid a bad CRAN check due to partial argument matches
lgb_args <- list(
......@@ -2952,4 +2953,5 @@ test_that("lightgbm() accepts 'weight' and 'weights'", {
, verbose = -1L
)
model <- do.call(lightgbm, lgb_args)
expect_equal(model$.__enclos_env__$private$train_set$get_field("weight"), w)
})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment