示例#1
0
def test_match_redirect_re_match_str():
    _cmdline_match_redirect(ps(), re.compile(r'.+\.txt'), 'abc.txt')
示例#2
0
def test_match_redirect_re_mismatch_str():
    with pytest.raises(TF):
        _cmdline_match_redirect(ps(), re.compile(r'.+\.txt'), 'abc.png')
示例#3
0
def test_match_redirect_str_matching_str():
    _cmdline_match_redirect(ps(), 'a', 'a')
示例#4
0
def test_match_redirect_str_mismatch_str():
    with pytest.raises(TF):
        _cmdline_match_redirect(ps(), 'a', 'b')
示例#5
0
def test_match_redirect_none_not_non_empty():
    with pytest.raises(TF):
        _cmdline_match_redirect(ps(), None, 'a')
示例#6
0
def test_match_redirect_none_with_empty():
    _cmdline_match_redirect(ps(), None, None)
示例#7
0
def test_match_redirect_re_mismatch_str():
    with pytest.raises(Exception):
        _cmdline_match_redirect(State(), re.compile(r'.+\.txt'), 'abc.png')
示例#8
0
def test_match_redirect_str_mismatch_str():
    with pytest.raises(Exception):
        _cmdline_match_redirect(State(), 'a', 'b')
示例#9
0
def test_match_redirect_none_not_non_empty():
    with pytest.raises(Exception):
        _cmdline_match_redirect(State(), None, 'a')