Example #1
0
def test_match():
    assert match(Mock(script='cd foo', stderr='cd: foo: No such file or directory'),
                 None)
    assert match(Mock(script='cd foo/bar/baz', stderr='cd: foo: No such file or directory'),
                 None)
    assert match(Mock(script='cd foo/bar/baz', stderr='cd: can\'t cd to foo/bar/baz'),
                 None)
    assert not match(Mock(script='cd foo',
                          stderr=''), None)
    assert not match(Mock(script='', stderr=''), None)
Example #2
0
def test_not_match(command):
    assert not match(command)
Example #3
0
def test_match(command):
    assert match(command)