Skip to content

Commit c6d686e

Browse files
committed
more instances
1 parent e1bc973 commit c6d686e

File tree

7 files changed

+3
-27
lines changed

7 files changed

+3
-27
lines changed

tests/testthat/test_boost_tree_xgboost.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ bad_rf_reg <-
9898
boost_tree(mode = "regression") %>%
9999
set_engine("xgboost", sampsize = -10)
100100

101-
ctrl <- list(verbosity = 1, catch = FALSE)
102-
caught_ctrl <- list(verbosity = 1, catch = TRUE)
103-
quiet_ctrl <- list(verbosity = 0, catch = TRUE)
104-
105101
test_that('xgboost execution, regression', {
106102

107103
skip_if_not_installed("xgboost")

tests/testthat/test_linear_reg.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ library(tibble)
77

88
context("linear regression")
99
source("helpers.R")
10+
source("helper-objects.R")
1011

1112
# ------------------------------------------------------------------------------
1213

@@ -209,10 +210,6 @@ num_pred <- c("Sepal.Width", "Petal.Width", "Petal.Length")
209210
iris_bad_form <- as.formula(Species ~ term)
210211
iris_basic <- linear_reg() %>% set_engine("lm")
211212

212-
ctrl <- control_parsnip(verbosity = 1, catch = FALSE)
213-
caught_ctrl <- control_parsnip(verbosity = 1, catch = TRUE)
214-
quiet_ctrl <- control_parsnip(verbosity = 0, catch = TRUE)
215-
216213
# ------------------------------------------------------------------------------
217214

218215
test_that('lm execution', {

tests/testthat/test_logistic_reg.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ library(tibble)
77

88
context("logistic regression")
99
source("helpers.R")
10+
source("helper-objects.R")
1011

1112
# ------------------------------------------------------------------------------
1213

@@ -219,9 +220,6 @@ lending_club <- head(lending_club, 200)
219220
lc_form <- as.formula(Class ~ log(funded_amnt) + int_rate)
220221
num_pred <- c("funded_amnt", "annual_inc", "num_il_tl")
221222
lc_basic <- logistic_reg() %>% set_engine("glm")
222-
ctrl <- control_parsnip(verbosity = 1, catch = FALSE)
223-
caught_ctrl <- control_parsnip(verbosity = 1, catch = TRUE)
224-
quiet_ctrl <- control_parsnip(verbosity = 0, catch = TRUE)
225223

226224
test_that('glm execution', {
227225

tests/testthat/test_mars.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ library(rlang)
66

77
context("mars tests")
88
source("helpers.R")
9+
source("helper-objects.R")
910

1011
# ------------------------------------------------------------------------------
1112

@@ -124,10 +125,6 @@ num_pred <- c("Sepal.Width", "Petal.Width", "Petal.Length")
124125
iris_bad_form <- as.formula(Species ~ term)
125126
iris_basic <- mars(mode = "regression") %>% set_engine("earth")
126127

127-
ctrl <- control_parsnip(verbosity = 1, catch = FALSE)
128-
caught_ctrl <- control_parsnip(verbosity = 1, catch = TRUE)
129-
quiet_ctrl <- control_parsnip(verbosity = 0, catch = TRUE)
130-
131128
# ------------------------------------------------------------------------------
132129

133130
test_that('mars execution', {

tests/testthat/test_mlp_nnet.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ bad_rf_reg <-
9191
mlp(mode = "regression") %>%
9292
set_engine("nnet", sampsize = -10)
9393

94-
ctrl <- list(verbosity = 1, catch = FALSE)
95-
caught_ctrl <- list(verbosity = 1, catch = TRUE)
96-
quiet_ctrl <- list(verbosity = 0, catch = TRUE)
97-
9894
# ------------------------------------------------------------------------------
9995

10096

tests/testthat/test_rand_forest_randomForest.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ bad_ranger_reg <- rand_forest(mode = "regression") %>%
153153
bad_rf_reg <- rand_forest(mode = "regression") %>%
154154
set_engine("randomForest", sampsize = -10)
155155

156-
ctrl <- list(verbosity = 1, catch = FALSE)
157-
caught_ctrl <- list(verbosity = 1, catch = TRUE)
158-
quiet_ctrl <- list(verbosity = 0, catch = TRUE)
159-
160156
# ------------------------------------------------------------------------------
161157

162158
test_that('randomForest regression execution', {

tests/testthat/test_rand_forest_ranger.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@ car_basic <- rand_forest(mode = "regression") %>% set_engine("ranger")
175175
bad_ranger_reg <- rand_forest(mode = "regression") %>% set_engine("ranger", replace = "bad")
176176
bad_rf_reg <- rand_forest(mode = "regression") %>% set_engine("ranger", sampsize = -10)
177177

178-
ctrl <- list(verbosity = 1, catch = FALSE)
179-
caught_ctrl <- list(verbosity = 1, catch = TRUE)
180-
quiet_ctrl <- list(verbosity = 0, catch = TRUE)
181-
182178
# ------------------------------------------------------------------------------
183179

184180
test_that('ranger regression execution', {

0 commit comments

Comments
 (0)