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

Method test_maxread

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

Source from the content-addressed store, hash-verified

217 self.assertEqual(test_proc.exitcode, errno.ETIMEDOUT)
218
219 def test_maxread(self):
220 sock = socket.socket(self.af, socket.SOCK_STREAM)
221 sock.connect((self.host, self.port))
222 session = self.spawn(sock, timeout=10)
223 session.maxread = 1100
224 session.expect(self.prompt1)
225 self.assertEqual(session.before, self.motd)
226 session.send(self.enter)
227 session.expect(self.prompt2)
228 session.send(self.enter)
229 session.expect(self.prompt3)
230 session.send(self.exit)
231 session.expect(pexpect.EOF)
232 self.assertEqual(session.before, b'')
233
234 def test_fd_isalive(self):
235 sock = socket.socket(self.af, socket.SOCK_STREAM)

Callers

nothing calls this directly

Calls 3

spawnMethod · 0.95
expectMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected