@@ -146,6 +146,7 @@ def _populate_metas(self):
146
146
def _execute_test_case (self , causal_test_case : CausalTestCase , test : Iterable [Mapping ], f_flag : bool ) -> bool :
147
147
"""Executes a singular test case, prints the results and returns the test case result
148
148
:param causal_test_case: The concrete test case to be executed
149
+ :param test: Single JSON test definition stored in a mapping (dict)
149
150
:param f_flag: Failure flag that if True the script will stop executing when a test fails.
150
151
:return: A boolean that if True indicates the causal test case passed and if false indicates the test case
151
152
failed.
@@ -178,9 +179,10 @@ def _execute_test_case(self, causal_test_case: CausalTestCase, test: Iterable[Ma
178
179
logger .warning (" FAILED- expected %s, got %s" , causal_test_case .expected_causal_effect , result_string )
179
180
return failed
180
181
181
- def _setup_test (self , causal_test_case : CausalTestCase , test ) -> tuple [CausalTestEngine , Estimator ]:
182
+ def _setup_test (self , causal_test_case : CausalTestCase , test : Mapping ) -> tuple [CausalTestEngine , Estimator ]:
182
183
"""Create the necessary inputs for a single test case
183
184
:param causal_test_case: The concrete test case to be executed
185
+ :param test: Single JSON test definition stored in a mapping (dict)
184
186
:returns:
185
187
- causal_test_engine - Test Engine instance for the test being run
186
188
- estimation_model - Estimator instance for the test being run
@@ -201,7 +203,7 @@ def _setup_test(self, causal_test_case: CausalTestCase, test) -> tuple[CausalTes
201
203
outcome = causal_test_case .outcome_variable .name ,
202
204
df = causal_test_engine .scenario_execution_data_df ,
203
205
effect_modifiers = causal_test_case .effect_modifier_configuration ,
204
- formula = test ["formula" ]
206
+ formula = test ["formula" ],
205
207
)
206
208
else :
207
209
estimation_model = test ["estimator" ](
0 commit comments