File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
causal_testing/generation Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,11 @@ def __init__(
30
30
effect_modifiers : set [Variable ] = None ,
31
31
estimate_type : str = "ate" ,
32
32
):
33
- assert treatment_variables in scenario .variables .values (), (
34
- "Treatment variables must be a subset of variables."
35
- + f" Instead got:\n treatment_variables={ treatment_variables } \n variables={ scenario .variables } "
36
- )
33
+ if treatment_variables not in scenario .variables .values ():
34
+ raise ValueError (
35
+ "Treatment variables must be a subset of variables."
36
+ + f" Instead got:\n treatment_variables={ treatment_variables } \n variables={ scenario .variables } "
37
+ )
37
38
38
39
assert len (expected_causal_effect ) == 1 , "We currently only support tests with one causal outcome"
39
40
You can’t perform that action at this time.
0 commit comments