예제 #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')