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
f2589310
Unverified
Commit
f2589310
authored
Jul 24, 2020
by
James Lamb
Committed by
GitHub
Jul 24, 2020
Browse files
[R-package] remove duplicated test (#3250)
parent
af514289
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
10 deletions
+1
-10
R-package/R/utils.R
R-package/R/utils.R
+1
-1
R-package/tests/testthat/test_utils.R
R-package/tests/testthat/test_utils.R
+0
-9
No files found.
R-package/R/utils.R
View file @
f2589310
...
@@ -311,7 +311,7 @@ lgb.check.obj <- function(params, obj) {
...
@@ -311,7 +311,7 @@ lgb.check.obj <- function(params, obj) {
# [description]
# [description]
# make sure that "metric" is populated on params,
# make sure that "metric" is populated on params,
# and add any eval values to it
t
# and add any eval values to it
# [return]
# [return]
# params, where "metric" is a list
# params, where "metric" is a list
lgb.check.eval
<-
function
(
params
,
eval
)
{
lgb.check.eval
<-
function
(
params
,
eval
)
{
...
...
R-package/tests/testthat/test_utils.R
View file @
f2589310
...
@@ -98,15 +98,6 @@ test_that("lgb.check.eval adds eval to metric in params", {
...
@@ -98,15 +98,6 @@ test_that("lgb.check.eval adds eval to metric in params", {
expect_identical
(
params
[[
"metric"
]],
list
(
"auc"
,
"binary_error"
))
expect_identical
(
params
[[
"metric"
]],
list
(
"auc"
,
"binary_error"
))
})
})
test_that
(
"lgb.check.eval adds eval to metric in params"
,
{
params
<-
lgb.check.eval
(
params
=
list
(
metric
=
"auc"
)
,
eval
=
"binary_error"
)
expect_named
(
params
,
"metric"
)
expect_identical
(
params
[[
"metric"
]],
list
(
"auc"
,
"binary_error"
))
})
test_that
(
"lgb.check.eval adds eval to metric in params if two evaluation names are provided"
,
{
test_that
(
"lgb.check.eval adds eval to metric in params if two evaluation names are provided"
,
{
params
<-
lgb.check.eval
(
params
<-
lgb.check.eval
(
params
=
list
(
metric
=
"auc"
)
params
=
list
(
metric
=
"auc"
)
...
...
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