Esempio n. 1
0
def test_match(ssh_error):
    errormsg, _, _, _ = ssh_error
    assert match(Command('ssh', stderr=errormsg))
    assert match(Command('ssh', stderr=errormsg))
    assert match(Command('scp something something', stderr=errormsg))
    assert match(Command('scp something something', stderr=errormsg))
    assert not match(Command(stderr=errormsg))
    assert not match(Command('notssh', stderr=errormsg))
    assert not match(Command('ssh'))
Esempio n. 2
0
def test_match(ssh_error):
    errormsg, _, _, _ = ssh_error
    assert match(Command('ssh', stderr=errormsg))
    assert match(Command('ssh', stderr=errormsg))
    assert match(Command('scp something something', stderr=errormsg))
    assert match(Command('scp something something', stderr=errormsg))
    assert not match(Command(stderr=errormsg))
    assert not match(Command('notssh', stderr=errormsg))
    assert not match(Command('ssh'))
Esempio n. 3
0
def test_match(ssh_error):
    errormsg, _, _, _ = ssh_error
    assert match(Command('ssh', '', errormsg), None)
    assert match(Command('ssh', '', errormsg), None)
    assert match(Command('scp something something', '', errormsg), None)
    assert match(Command('scp something something', '', errormsg), None)
    assert not match(Command('', '', errormsg), None)
    assert not match(Command('notssh', '', errormsg), None)
    assert not match(Command('ssh', '', ''), None)
def test_match(ssh_error):
    errormsg, _, _, _ = ssh_error
    assert match(Command('ssh', '', errormsg), None)
    assert match(Command('ssh', '', errormsg), None)
    assert match(Command('scp something something', '', errormsg), None)
    assert match(Command('scp something something', '', errormsg), None)
    assert not match(Command('', '', errormsg), None)
    assert not match(Command('notssh', '', errormsg), None)
    assert not match(Command('ssh', '', ''), None)
def test_match(ssh_error):
    errormsg, _, _, _ = ssh_error
    assert match(Command("ssh", errormsg))
    assert match(Command("ssh", errormsg))
    assert match(Command("scp something something", errormsg))
    assert match(Command("scp something something", errormsg))
    assert not match(Command(errormsg, ""))
    assert not match(Command("notssh", errormsg))
    assert not match(Command("ssh", ""))
Esempio n. 6
0
def test_match(ssh_error):
    errormsg, _, _, _ = ssh_error
    assert match(Command("ssh", stderr=errormsg), None)
    assert match(Command("ssh", stderr=errormsg), None)
    assert match(Command("scp something something", stderr=errormsg), None)
    assert match(Command("scp something something", stderr=errormsg), None)
    assert not match(Command(stderr=errormsg), None)
    assert not match(Command("notssh", stderr=errormsg), None)
    assert not match(Command("ssh"), None)