@@ -181,6 +181,28 @@ def test_exactValue_pass_ci(self):
181
181
ev = ExactValue (5 , 0.1 )
182
182
self .assertTrue (ev .apply (ctr ))
183
183
184
+ def test_exactValue_ci_pass_ci (self ):
185
+ test_value = TestValue (type = "ate" , value = pd .Series (5.05 ))
186
+ ctr = CausalTestResult (
187
+ estimator = self .estimator ,
188
+ test_value = test_value ,
189
+ confidence_intervals = [pd .Series (4.1 ), pd .Series (5.9 )],
190
+ effect_modifier_configuration = None ,
191
+ )
192
+ ev = ExactValue (5 , ci_low = 4 , ci_high = 6 )
193
+ self .assertTrue (ev .apply (ctr ))
194
+
195
+ def test_exactValue_ci_fail_ci (self ):
196
+ test_value = TestValue (type = "ate" , value = pd .Series (5.05 ))
197
+ ctr = CausalTestResult (
198
+ estimator = self .estimator ,
199
+ test_value = test_value ,
200
+ confidence_intervals = [pd .Series (3.9 ), pd .Series (6.1 )],
201
+ effect_modifier_configuration = None ,
202
+ )
203
+ ev = ExactValue (5 , ci_low = 4 , ci_high = 6 )
204
+ self .assertTrue (ev .apply (ctr ))
205
+
184
206
def test_exactValue_fail (self ):
185
207
test_value = TestValue (type = "ate" , value = pd .Series (0 ))
186
208
ctr = CausalTestResult (
@@ -196,6 +218,22 @@ def test_invalid_atol(self):
196
218
with self .assertRaises (ValueError ):
197
219
ExactValue (5 , - 0.1 )
198
220
221
+ def test_unspecified_ci_high (self ):
222
+ with self .assertRaises (ValueError ):
223
+ ExactValue (5 , ci_low = - 0.1 )
224
+
225
+ def test_unspecified_ci_low (self ):
226
+ with self .assertRaises (ValueError ):
227
+ ExactValue (5 , ci_high = - 0.1 )
228
+
229
+ def test_invalid_ci_range (self ):
230
+ with self .assertRaises (ValueError ):
231
+ ExactValue (5 , ci_low = 6 , ci_high = 7 , atol = 0.05 )
232
+
233
+ def test_invalid_ci_atol (self ):
234
+ with self .assertRaises (ValueError ):
235
+ ExactValue (1000 , ci_low = 1001 , ci_high = 1002 , atol = 0.05 )
236
+
199
237
def test_invalid (self ):
200
238
test_value = TestValue (type = "invalid" , value = pd .Series (5.05 ))
201
239
ctr = CausalTestResult (
0 commit comments