Exemplo n.º 1
0
def test_match_str_callable_mismatch():
    with pytest.raises(TF):
        tc_match_str(ps(), lambda x: x > 0, -999,
                     'callable matches incorrectly')
Exemplo n.º 2
0
def test_match_str_callable_match():
    tc_match_str(ps(), lambda x: x > 0, 123, 'callable fails to match')
Exemplo n.º 3
0
def test_match_str_regex_mismatch():
    with pytest.raises(TF):
        tc_match_str(ps(), rxc(r'ab+c'), 'ac', 'regex matches incorrectly')
Exemplo n.º 4
0
def test_match_str_regex_match():
    tc_match_str(ps(), rxc(r'ab+c'), 'abbbc', 'regex fails to match')
Exemplo n.º 5
0
def test_match_str_unequal_strings():
    with pytest.raises(TF):
        tc_match_str(ps(), 'abc', 'def', 'unequal strings match')
Exemplo n.º 6
0
def test_match_str_equal_strings():
    tc_match_str(ps(), 'abc', 'abc', 'equal strings fail to match')