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

Method test_fd_isalive

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

Source from the content-addressed store, hash-verified

232 self.assertEqual(session.before, b'')
233
234 def test_fd_isalive(self):
235 sock = socket.socket(self.af, socket.SOCK_STREAM)
236 sock.connect((self.host, self.port))
237 session = self.spawn(sock, timeout=10)
238 assert session.isalive()
239 sock.close()
240 assert not session.isalive(), "Should not be alive after close()"
241
242 def test_fd_isalive_poll(self):
243 sock = socket.socket(self.af, socket.SOCK_STREAM)

Callers

nothing calls this directly

Calls 3

spawnMethod · 0.95
isaliveMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected