Skip to content

Commit ecd05c2

Browse files
committed
apply styler
1 parent 9449286 commit ecd05c2

8 files changed

+23
-21
lines changed

tests/testthat/test-double_ml_pliv_exception_handling.R

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ test_that("Unit tests of exception handling for DoubleMLPLIV", {
6565
ml_m = lrn("regr.ranger")
6666
ml_r = lrn("regr.ranger")
6767
ml_g = lrn("regr.ranger")
68-
69-
70-
msg = paste0("A learner ml_g has been provided for ",
71-
"score = 'partialling out' but will be ignored.")
68+
69+
70+
msg = paste0(
71+
"A learner ml_g has been provided for ",
72+
"score = 'partialling out' but will be ignored.")
7273
expect_warning(DoubleMLPLIV$new(dml_data_pliv,
73-
ml_l = ml_l, ml_m = ml_m, ml_r = ml_r,
74-
ml_g = ml_g,
75-
score = "partialling out"),
76-
regexp = msg)
74+
ml_l = ml_l, ml_m = ml_m, ml_r = ml_r,
75+
ml_g = ml_g,
76+
score = "partialling out"),
77+
regexp = msg)
7778
}
7879
)

tests/testthat/test-double_ml_pliv_parameter_passing.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ patrick::with_parameters_test_that("Unit tests for parameter passing of PLIV (no
129129
train_ids = list(my_sampling$train_set(1))
130130
test_ids = list(my_sampling$test_set(1))
131131
smpls = list(list(train_ids = train_ids, test_ids = test_ids))
132-
132+
133133
if (score == "IV-type") {
134134
ml_g = mlr3::lrn(learner_pars$mlmethod$mlmethod_g)
135135
} else {

tests/testthat/test-double_ml_pliv_tuning.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ patrick::with_parameters_test_that("Unit tests for tuning of PLIV",
6262
data_ml = double_ml_data_from_data_frame(df,
6363
y_col = "y",
6464
d_cols = "d", x_cols = Xnames, z_cols = z_cols)
65-
65+
6666
if (score == "IV-type") {
6767
ml_g = learner
6868
} else {

tests/testthat/test-double_ml_plr_exception_handling.R

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,21 @@ patrick::with_parameters_test_that("Unit tests for exception handling of PLR:",
124124
msg = "Multiplier bootstrap has not yet been performed. First call bootstrap\\(\\) and then try confint\\(\\) again."
125125
expect_error(double_mlplr_obj$confint(joint = TRUE, level = 0.95),
126126
regexp = msg)
127-
127+
128128
set.seed(3141)
129129
dml_data = make_plr_CCDDHNR2018(n_obs = 101)
130130
ml_l = lrn("regr.ranger")
131131
ml_m = ml_l$clone()
132132
ml_g = ml_l$clone()
133-
133+
134134
if (score == "partialling out") {
135-
msg = paste0("A learner ml_g has been provided for ",
136-
"score = 'partialling out' but will be ignored.")
135+
msg = paste0(
136+
"A learner ml_g has been provided for ",
137+
"score = 'partialling out' but will be ignored.")
137138
expect_warning(DoubleMLPLR$new(dml_data,
138-
ml_l = ml_l, ml_m = ml_m, ml_g=ml_g,
139-
score = score),
140-
regexp = msg)
139+
ml_l = ml_l, ml_m = ml_m, ml_g = ml_g,
140+
score = score),
141+
regexp = msg)
141142
}
142143
}
143144
}

tests/testthat/test-double_ml_plr_export_preds.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ patrick::with_parameters_test_that("Unit tests for for the export of predictions
3131
set.seed(3141)
3232
df = data_plr$df
3333
dml_data = data_plr$dml_data
34-
34+
3535
if (score == "IV-type") {
3636
ml_g = lrn(g_learner)
3737
} else {

tests/testthat/test-double_ml_plr_multitreat.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ patrick::with_parameters_test_that("Unit tests for PLR:",
6161
data_ml = double_ml_data_from_data_frame(data_plr_multi,
6262
y_col = "y",
6363
d_cols = c("d1", "d2", "d3"), x_cols = Xnames)
64-
64+
6565
if (score == "IV-type") {
6666
ml_g = learner_pars$ml_g$clone()
6767
} else {

tests/testthat/test-double_ml_plr_parameter_passing.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ patrick::with_parameters_test_that("Unit tests for parameter passing of PLR (no
141141
train_ids = list(my_sampling$train_set(1))
142142
test_ids = list(my_sampling$test_set(1))
143143
smpls = list(list(train_ids = train_ids, test_ids = test_ids))
144-
144+
145145
if (score == "IV-type") {
146146
ml_g = mlr3::lrn(learner_pars$mlmethod$mlmethod_g)
147147
} else {

tests/testthat/test-double_ml_plr_set_samples.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ patrick::with_parameters_test_that("PLR with external sample provision:",
3434
data_ml = double_ml_data_from_data_frame(data_plr$df,
3535
y_col = "y",
3636
d_cols = "d", x_cols = Xnames)
37-
37+
3838
if (score == "IV-type") {
3939
ml_g = learner_pars$ml_g$clone()
4040
} else {

0 commit comments

Comments
 (0)