def test_match_redirect_re_match_str(): _cmdline_match_redirect(ps(), re.compile(r'.+\.txt'), 'abc.txt')
def test_match_redirect_re_mismatch_str(): with pytest.raises(TF): _cmdline_match_redirect(ps(), re.compile(r'.+\.txt'), 'abc.png')
def test_match_redirect_str_matching_str(): _cmdline_match_redirect(ps(), 'a', 'a')
def test_match_redirect_str_mismatch_str(): with pytest.raises(TF): _cmdline_match_redirect(ps(), 'a', 'b')
def test_match_redirect_none_not_non_empty(): with pytest.raises(TF): _cmdline_match_redirect(ps(), None, 'a')
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')