MCPcopy Index your code
hub / github.com/python/cpython / testFromFd

Method testFromFd

Lib/test/test_socket.py:3123–3130  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3121 self.serv_conn.sendall(big_chunk)
3122
3123 def testFromFd(self):
3124 # Testing fromfd()
3125 fd = self.cli_conn.fileno()
3126 sock = socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM)
3127 self.addCleanup(sock.close)
3128 self.assertIsInstance(sock, socket.socket)
3129 msg = sock.recv(1024)
3130 self.assertEqual(msg, MSG)
3131
3132 def _testFromFd(self):
3133 self.serv_conn.send(MSG)

Callers

nothing calls this directly

Calls 5

addCleanupMethod · 0.80
assertIsInstanceMethod · 0.80
filenoMethod · 0.45
recvMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected