def test_client_wait_finished_timeout(self): client = SSHClient(self.host, port=self.port, pkey=self.user_key, num_retries=1, timeout=0.6) chan = client.execute('sleep 1') self.assertRaises(Timeout, client.wait_finished, chan)
def scope_killer(): for _ in range(5): client = SSHClient(self.host, port=self.port, pkey=self.user_key, num_retries=1, allow_agent=False) channel = client.execute(self.cmd) output = list(client.read_output(channel)) self.assertListEqual(output, [b'me'])