def test_tail(self): """tail should return prob/2 if test is true, or 1-(prob/2) if false """ np.testing.assert_allclose(tail(0.25, True), 0.125) np.testing.assert_allclose(tail(0.25, False), 0.875) np.testing.assert_allclose(tail(1, True), 0.5) np.testing.assert_allclose(tail(1, False), 0.5) np.testing.assert_allclose(tail(0, True), 0) np.testing.assert_allclose(tail(0, False), 1)
def test_tail(self): """tail should return x/2 if test is true; 1-(x/2) otherwise""" np.testing.assert_allclose(tail(0.25, 'a' == 'a'), 0.25 / 2) np.testing.assert_allclose(tail(0.25, 'a' != 'a'), 1 - (0.25 / 2))