Пример #1
0
def test_files_set_with_leading_as_trailing_mismatch():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', ['a', {'x', 'y'}], ['x', 'y', 'a'])
Пример #2
0
def test_files_empty_empty_passes():
    tc_check_files(ps(), 'CMD', [], [])
Пример #3
0
def test_files_set_with_trailing_match():
    tc_check_files(ps(), 'CMD', [{'x', 'y'}, 'a'], ['x', 'y', 'a'])
Пример #4
0
def test_files_set_with_trailing_mismatch():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', [{'x', 'y'}, 'a'], ['x', 'y', 'b'])
Пример #5
0
def test_files_regex_match_succeeds():
    tc_check_files(ps(), 'CMD', [rxc(r'ab+c')], ['abbbc'])
Пример #6
0
def test_files_set_with_leading_match():
    tc_check_files(ps(), 'CMD', ['a', {'x', 'y'}], ['a', 'x', 'y'])
Пример #7
0
def test_files_singleton_set_mismatch():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', [{'x'}], ['y'])
Пример #8
0
def test_files_text_lengthy_match_succeeds():
    tc_check_files(ps(), 'CMD', ['a', 'b'], ['a', 'b'])
Пример #9
0
def test_files_callable_trailing_mismatch_fails():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', ['x', lambda x: len(x) == 5], ['y', 'b'])
Пример #10
0
def test_files_singleton_set_match():
    tc_check_files(ps(), 'CMD', [{'x'}], ['x'])
Пример #11
0
def test_files_callable_trailing_match_succeeds():
    tc_check_files(ps(), 'CMD', ['x', lambda x: len(x) == 5], ['x', 'abbbc'])
Пример #12
0
def test_files_regex_trailing_mismatch_fails():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', ['x', rxc(r'ab+c')], ['y', 'b'])
Пример #13
0
def test_files_regex_trailing_match_succeeds():
    tc_check_files(ps(), 'CMD', ['x', rxc(r'ab+c')], ['x', 'abbbc'])
Пример #14
0
def test_files_nonempty_empty_fails():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', ['whoops'], [])
Пример #15
0
def test_files_double_set_match():
    tc_check_files(ps(), 'CMD', [{'x', 'y'}], ['x', 'y'])
Пример #16
0
def test_files_text_match_succeeds():
    tc_check_files(ps(), 'CMD', ['a'], ['a'])
Пример #17
0
def test_files_double_set_mismatch():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', [{'x', 'y'}], ['a', 'y'])
Пример #18
0
def test_files_text_lengthy_mismatch_fails():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', ['b', 'a'], ['a', 'b'])
Пример #19
0
def test_files_text_overlong_actual_fails():
    with pytest.raises(TF):
        tc_check_files(ps(), 'CMD', ['a', 'b'], ['a', 'b', 'c'])