def test_match(): assert match(Mock(script='rm -rf /', stderr='add --no-preserve-root'), None) assert not match(Mock(script='ls', stderr='add --no-preserve-root'), None) assert not match( Mock(script='rm --no-preserve-root /', stderr='add --no-preserve-root'), None) assert not match(Mock(script='rm -rf /', stderr=''), None)
def test_match(): assert match(Command(script='rm -rf /', stderr='add --no-preserve-root'))
def test_not_match(command): assert not match(command)
def test_match(): assert match(Command('rm -rf /', 'add --no-preserve-root'))
def test_match(): assert match(Command(script="rm -rf /", stderr="add --no-preserve-root"), None)
def test_match(): assert match(Command("rm -rf /", "add --no-preserve-root"))