Exemplo n.º 1
0
def test_match():
    assert match(
        Command('mkdir foo/bar/baz', '',
                'mkdir: foo/bar: No such file or directory'), None)
    assert not match(Command('mkdir foo/bar/baz', '', ''), None)
    assert not match(Command('mkdir foo/bar/baz', '', 'foo bar baz'), None)
    assert not match(Command('', '', ''), None)
Exemplo n.º 2
0
def test_not_match(command):
    assert not match(command)
Exemplo n.º 3
0
def test_match(command):
    assert match(command)
Exemplo n.º 4
0
def test_not_match(command):
    assert not match(command, None)
Exemplo n.º 5
0
def test_match():
    assert match(Command('mkdir foo/bar/baz', '', 'mkdir: foo/bar: No such file or directory'), None)
    assert not match(Command('mkdir foo/bar/baz', '', ''), None)
    assert not match(Command('mkdir foo/bar/baz', '', 'foo bar baz'), None)
    assert not match(Command('', '', ''), None)
Exemplo n.º 6
0
def test_match():
    assert match(Command('mkdir foo/bar/baz',
                         stderr='mkdir: foo/bar: No such file or directory'),
                 None)
Exemplo n.º 7
0
def test_match(command):
    assert match(command)