@@ -18,8 +18,7 @@ test_that("x_cols setter", {
1818
1919 msg = paste0(
2020 " Assertion on 'x_cols' failed: Must be a subset of" ,
21- " \\ {'X1','X2','X3','X4','X5','X6','X7','X8','X9','X10','X11','X12','X13','X14','X15','X16','X17','X18','X19','X20','y','d'\\ }," ,
22- " but is \\ {'X1','X11','A13'\\ }." )
21+ " \\ {'X1','X2','X3','X4','X5','X6','X7','X8','X9','X10','X11','X12','X13','X14','X15','X16','X17','X18','X19','X20','y','d'\\ }" )
2322 expect_error(dml_data $ x_cols <- c(" X1" , " X11" , " A13" ),
2423 regexp = msg )
2524
@@ -55,15 +54,13 @@ test_that("d_cols setter", {
5554
5655 msg = paste0(
5756 " Assertion on 'd_cols' failed: Must be a subset of" ,
58- " \\ {'X1','X2','X3','X4','X5','X6','X7','y','d1','d2'\\ }," ,
59- " but is \\ {'d1','d13'\\ }." )
57+ " \\ {'X1','X2','X3','X4','X5','X6','X7','y','d1','d2'\\ }" )
6058 expect_error(dml_data $ d_cols <- c(" d1" , " d13" ),
6159 regexp = msg )
6260
6361 msg = paste0(
6462 " Assertion on 'd_cols' failed: Must be a subset of" ,
65- " \\ {'X1','X2','X3','X4','X5','X6','X7','y','d1','d2'\\ }," ,
66- " but is \\ {'d13'\\ }." )
63+ " \\ {'X1','X2','X3','X4','X5','X6','X7','y','d1','d2'\\ }" )
6764 expect_error(dml_data $ d_cols <- " d13" ,
6865 regexp = msg )
6966
@@ -99,15 +96,13 @@ test_that("z_cols setter", {
9996
10097 msg = paste0(
10198 " Assertion on 'z_cols' failed: Must be a subset of" ,
102- " \\ {'X1','X2','X3','X4','z1','z2','z3','y','d1','d2'\\ }," ,
103- " but is \\ {'z1','a13'\\ }." )
99+ " \\ {'X1','X2','X3','X4','z1','z2','z3','y','d1','d2'\\ }" )
104100 expect_error(dml_data $ z_cols <- c(" z1" , " a13" ),
105101 regexp = msg )
106102
107103 msg = paste0(
108104 " Assertion on 'z_cols' failed: Must be a subset of" ,
109- " \\ {'X1','X2','X3','X4','z1','z2','z3','y','d1','d2'\\ }," ,
110- " but is \\ {'a13'\\ }." )
105+ " \\ {'X1','X2','X3','X4','z1','z2','z3','y','d1','d2'\\ }" )
111106 expect_error(dml_data $ z_cols <- " a13" ,
112107 regexp = msg )
113108
@@ -151,8 +146,7 @@ test_that("y_col setter", {
151146
152147 msg = paste0(
153148 " Assertion on 'y_col' failed: Must be a subset of" ,
154- " \\ {'X1','X2','X3','X4','X5','X6','X7','y','y123','d'\\ }," ,
155- " but is \\ {'d13'\\ }." )
149+ " \\ {'X1','X2','X3','X4','X5','X6','X7','y','y123','d'\\ }" )
156150 expect_error(dml_data $ y_col <- " d13" ,
157151 regexp = msg )
158152
@@ -181,15 +175,13 @@ test_that("cluster_cols setter", {
181175
182176 msg = paste0(
183177 " Assertion on 'cluster_cols' failed: Must be a subset of" ,
184- " \\ {'X1','X2','X3','X4','X5','y','d1','d2','c1','c2'\\ }," ,
185- " but is \\ {'c1','c13'\\ }." )
178+ " \\ {'X1','X2','X3','X4','X5','y','d1','d2','c1','c2'\\ }" )
186179 expect_error(dml_data $ cluster_cols <- c(" c1" , " c13" ),
187180 regexp = msg )
188181
189182 msg = paste0(
190183 " Assertion on 'cluster_cols' failed: Must be a subset of" ,
191- " \\ {'X1','X2','X3','X4','X5','y','d1','d2','c1','c2'\\ }," ,
192- " but is \\ {'c13'\\ }." )
184+ " \\ {'X1','X2','X3','X4','X5','y','d1','d2','c1','c2'\\ }" )
193185 expect_error(dml_data $ cluster_cols <- " c13" ,
194186 regexp = msg )
195187
@@ -239,7 +231,7 @@ test_that("Tests for use_other_treat_as_covariate", {
239231 expect_error(dml_data $ use_other_treat_as_covariate <- 5 ,
240232 regexp = msg )
241233
242- msg = " Assertion on 'treatment_var' failed: Must be a subset of \\ {'d1','d2'\\ }, but is \\ {'d3' \\ }. "
234+ msg = " Assertion on 'treatment_var' failed: Must be a subset of \\ {'d1','d2'\\ }"
243235 expect_error(dml_data $ set_data_model(" d3" ),
244236 regexp = msg )
245237
0 commit comments