Skip to content

Commit fb287ec

Browse files
Add test for catching multiple value exception
1 parent 5265e9f commit fb287ec

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/testing_tests/test_causal_test_outcome.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,16 @@ def test_negative_risk_ratio_e_value_using_ci(self):
322322
cv = CausalValidator()
323323
e_value = cv.estimate_e_value_using_ci(0.8, [0.2, 0.9])
324324
self.assertEqual(round(e_value, 4), 1.4625)
325+
326+
def test_multiple_value_exception_caught(self):
327+
test_value = TestValue(type="ate", value=pd.Series([0, 1]))
328+
ctr = CausalTestResult(
329+
estimator=self.estimator,
330+
test_value=test_value,
331+
confidence_intervals=[None, None],
332+
effect_modifier_configuration=None,
333+
)
334+
with self.assertRaises(ValueError):
335+
Positive().apply(ctr)
336+
with self.assertRaises(ValueError):
337+
Negative().apply(ctr)

0 commit comments

Comments
 (0)