MCPcopy Create free account
hub / github.com/pexpect/pexpect / test_timeout

Method test_timeout

tests/test_socket.py:184–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

182 self.assertEqual(session.before, b'')
183
184 def test_timeout(self):
185 with self.assertRaises(pexpect.TIMEOUT):
186 sock = socket.socket(self.af, socket.SOCK_STREAM)
187 sock.connect((self.host, self.port))
188 session = self.spawn(sock, timeout=10)
189 session.expect(b'Bogus response')
190
191 def test_interrupt(self):
192 timed_out = multiprocessing.Event()

Callers

nothing calls this directly

Calls 3

spawnMethod · 0.95
assertRaisesMethod · 0.80
expectMethod · 0.80

Tested by

no test coverage detected