@@ -240,28 +240,32 @@ def test_concrete_generate_params(self):
240
240
"tests" : [
241
241
{
242
242
"name" : "test1" ,
243
- "treatment_variable" : "test_input" ,
244
- "control_value" : 0 ,
245
- "treatment_value" : 1 ,
243
+ "mutations" : {"test_input" : "Increase" },
246
244
"estimator" : "LinearRegressionEstimator" ,
247
245
"estimate_type" : "ate" ,
246
+ "effect_modifiers" : [],
248
247
"expected_effect" : {"test_output" : "NoEffect" },
249
248
"sample_size" : 5 ,
250
249
"target_ks_score" : 0.05 ,
251
250
"skip" : False ,
252
-
253
251
}
254
252
]
255
253
}
256
254
self .json_class .test_plan = example_test
257
255
effects = {"NoEffect" : NoEffect ()}
256
+ mutates = {
257
+ "Increase" : lambda x : self .json_class .scenario .treatment_variables [x ].z3
258
+ > self .json_class .scenario .variables [x ].z3
259
+ }
258
260
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
259
261
260
- self .json_class .run_json_tests (effects = effects , estimators = estimators , f_flag = False )
262
+ self .json_class .run_json_tests (effects = effects , estimators = estimators , f_flag = False , mutates = mutates )
261
263
264
+ # Test that the final log message prints that failed tests are printed, which is expected behaviour for this
265
+ # scenario
262
266
with open ("temp_out.txt" , "r" ) as reader :
263
267
temp_out = reader .readlines ()
264
- self .assertIn ("FAILED " , temp_out [- 1 ])
268
+ self .assertIn ("failed " , temp_out [- 1 ])
265
269
266
270
def tearDown (self ) -> None :
267
271
remove_temp_dir_if_existent ()
0 commit comments