Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
3ed0027b
Unverified
Commit
3ed0027b
authored
Mar 30, 2022
by
James Lamb
Committed by
GitHub
Mar 30, 2022
Browse files
[R-package] add assertions to test on lightgbm() weights (#5110)
parent
60244e4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
R-package/tests/testthat/test_basic.R
R-package/tests/testthat/test_basic.R
+2
-0
No files found.
R-package/tests/testthat/test_basic.R
View file @
3ed0027b
...
...
@@ -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
)
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment