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