@@ -99,7 +99,7 @@ def test_f_flag(self):
99
99
effects = {"NoEffect" : NoEffect ()}
100
100
mutates = {
101
101
"Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
102
- > self .json_class .scenario .variables [x ].z3
102
+ > self .json_class .scenario .variables [x ].z3
103
103
}
104
104
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
105
105
with self .assertRaises (StatisticsError ):
@@ -149,7 +149,7 @@ def test_run_json_tests_from_json(self):
149
149
effects = {"NoEffect" : NoEffect ()}
150
150
mutates = {
151
151
"Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
152
- > self .json_class .scenario .variables [x ].z3
152
+ > self .json_class .scenario .variables [x ].z3
153
153
}
154
154
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
155
155
@@ -176,7 +176,7 @@ def test_generate_tests_from_json_no_dist(self):
176
176
effects = {"NoEffect" : NoEffect ()}
177
177
mutates = {
178
178
"Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
179
- > self .json_class .scenario .variables [x ].z3
179
+ > self .json_class .scenario .variables [x ].z3
180
180
}
181
181
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
182
182
@@ -206,7 +206,7 @@ def test_formula_in_json_test(self):
206
206
effects = {"Positive" : Positive ()}
207
207
mutates = {
208
208
"Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
209
- > self .json_class .scenario .variables [x ].z3
209
+ > self .json_class .scenario .variables [x ].z3
210
210
}
211
211
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
212
212
@@ -259,7 +259,7 @@ def test_concrete_generate_params(self):
259
259
effects = {"NoEffect" : NoEffect ()}
260
260
mutates = {
261
261
"Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
262
- > self .json_class .scenario .variables [x ].z3
262
+ > self .json_class .scenario .variables [x ].z3
263
263
}
264
264
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
265
265
@@ -294,16 +294,15 @@ def test_estimator_formula_type_check(self):
294
294
]
295
295
}
296
296
self .json_class .test_plan = example_test
297
-
297
+ effects = {"Positive" : Positive ()}
298
+ mutates = {
299
+ "Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
300
+ > self .json_class .scenario .variables [x ].z3
301
+ }
302
+ estimators = {"CausalForestEstimator" : CausalForestEstimator }
298
303
with self .assertRaises (TypeError ):
299
304
self .json_class .run_json_tests (effects = effects , mutates = mutates , estimators = estimators , f_flag = False )
300
305
301
- effects = {"Positive" : Positive ()}
302
- mutates = {
303
- "Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
304
- > self .json_class .scenario .variables [x ].z3
305
- }
306
- estimators = {"CausalForestEstimator" : CausalForestEstimator }
307
306
308
307
def test_constructive_back_door_not_met (self ):
309
308
example_test = {
@@ -334,7 +333,6 @@ def test_constructive_back_door_not_met(self):
334
333
test_data_dir_path = Path ("tests/resources/data" )
335
334
dag_path = str (test_data_dir_path / "dag_not_descendent.dot" )
336
335
data_path = [str (test_data_dir_path / "not_descendent.csv" )]
337
-
338
336
input_dict_list = [
339
337
{"name" : "X" , "datatype" : float },
340
338
{"name" : "Z" , "datatype" : float },
0 commit comments