@@ -95,6 +95,8 @@ def test_abstract_test_case_generation(self):
95
95
96
96
def test_execute_concrete_test (self ):
97
97
self .json_class .setup ()
98
+ dag_string = "digraph G { test_input -> B; B -> C; test_output -> test_input; test_output -> C}"
99
+ setup_dag_file (self .dag_path , dag_string )
98
100
effects = {"NoEffect" : NoEffect ()}
99
101
mutates = {
100
102
"Increase" : lambda x : self .json_class .modelling_scenario .treatment_variables [x ].z3 >
@@ -113,7 +115,10 @@ def test_execute_concrete_test(self):
113
115
estimators = {"LinearRegressionEstimator" : LinearRegressionEstimator }
114
116
abstract_test_case = self .json_class ._create_abstract_test_case (example_test , mutates , effects )
115
117
concrete_tests , dummy = abstract_test_case .generate_concrete_tests (5 , 0.5 )
116
- self .json_class ._execute_tests (concrete_tests , estimators , example_test , False )
118
+
119
+ #This scenario produces 5 errors
120
+ failures = self .json_class ._execute_tests (concrete_tests , estimators , example_test , False )
121
+ self .assertEqual (failures , 5 )
117
122
118
123
def tearDown (self ) -> None :
119
124
#remove_temp_dir_if_existent()
@@ -151,14 +156,15 @@ def setup_data_file(data_path):
151
156
writer .writerow (header )
152
157
writer .writerow (data )
153
158
154
- def setup_dag_file (dag_path ):
155
- dag_dot = """digraph G { test_input -> B; B -> C; test_output -> test_input; test_output -> C}"""
159
+ def setup_dag_file (dag_path , dag_string ):
160
+ dag_dot = dag_string
156
161
with open (dag_path , "w" ) as f :
157
162
f .write (dag_dot )
158
163
f .close ()
159
164
160
165
161
166
def setup_files (json_path , data_path , dag_path ):
167
+ dag_string = "digraph G { test_input -> B; B -> C; test_output -> test_input; test_output -> C}"
162
168
setup_data_file (data_path )
163
169
setup_json_file (json_path )
164
- setup_dag_file (dag_path )
170
+ setup_dag_file (dag_path , dag_string )
0 commit comments