예제 #1
0
def test_check_correct_fail_multi_msg(state):
    f1, f2, f3 = [partial(fails, msg="f%s" % ii) for ii in range(1, 4)]
    with pytest.raises(TF, match="f2"):
        cl.check_correct(state, [f1, f3], [f2, f3])
예제 #2
0
def test_check_correct_fail_force_diagnose(state):
    state.force_diagnose = True
    with pytest.raises(TF, match="f2"):
        cl.check_correct(state, passes, partial(fails, msg="f2"))
예제 #3
0
def test_check_correct_fail_msg(state):
    f1, f2 = partial(fails, msg="f1"), partial(fails, msg="f2")
    with pytest.raises(TF, match="f2"):
        cl.check_correct(state, f1, f2)
예제 #4
0
def test_check_correct_pass(state):
    cl.check_correct(state, passes, fails)