File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,31 @@ def test_generate_tests_from_json(self):
127
127
temp_out = reader .readlines ()
128
128
self .assertIn ("failed" , temp_out [- 1 ])
129
129
130
+ def test_values_not_mutates (self ):
131
+ example_test = {
132
+ "tests" : [
133
+ {
134
+ "name" : "test1" ,
135
+ "treatment_variable" : "test_input" ,
136
+ "control_value" : 0 ,
137
+ "treatment_value" : 1 ,
138
+ "estimator" : "LinearRegressionEstimator" ,
139
+ "estimate_type" : "ate" ,
140
+ "expectedEffect" : {"test_output" : "NoEffect" },
141
+ "skip" : False ,
142
+ }
143
+ ]
144
+ }
145
+ self .json_class .test_plan = example_test
146
+ effects = {"NoEffect" : NoEffect ()}
147
+ estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
148
+
149
+ self .json_class .run_json_tests (effects , estimators , False )
150
+ with open ("temp_out.txt" , 'r' ) as reader :
151
+ temp_out = reader .readlines ()
152
+ self .assertIn ("failed" , temp_out [- 1 ])
130
153
def tearDown (self ) -> None :
131
- pass
132
- # remove_temp_dir_if_existent()
154
+ remove_temp_dir_if_existent ()
133
155
134
156
135
157
def populate_example (* args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments