def test_match(): assert match(Command('rm foo', '', 'rm: foo: is a directory'), None) assert not match(Command('rm foo', '', ''), None) assert not match(Command('rm foo', '', 'foo bar baz'), None) assert not match(Command('', '', ''), None)
def test_match(command): assert match(command)
def test_not_match(command): assert not match(command)
def test_match(command): assert match(command, None) assert match(command, None)