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

Method dgram_examine

Lib/test/test_socketserver.py:157–166  ·  view source on GitHub ↗
(self, proto, addr)

Source from the content-addressed store, hash-verified

155 self.assertEqual(buf, TEST_STR)
156
157 def dgram_examine(self, proto, addr):
158 with socket.socket(proto, socket.SOCK_DGRAM) as s:
159 if HAVE_UNIX_SOCKETS and proto == socket.AF_UNIX:
160 s.bind(self.pickaddr(proto))
161 s.sendto(TEST_STR, addr)
162 buf = data = receive(s, 100)
163 while data and b'\n' not in buf:
164 data = receive(s, 100)
165 buf += data
166 self.assertEqual(buf, TEST_STR)
167
168 def test_TCPServer(self):
169 self.run_server(socketserver.TCPServer,

Callers

nothing calls this directly

Calls 6

pickaddrMethod · 0.95
receiveFunction · 0.85
socketMethod · 0.80
bindMethod · 0.45
sendtoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected