MCPcopy Index your code
hub / github.com/RustPython/RustPython / dgram_examine

Method dgram_examine

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

Source from the content-addressed store, hash-verified

153 self.assertEqual(buf, TEST_STR)
154
155 def dgram_examine(self, proto, addr):
156 with socket.socket(proto, socket.SOCK_DGRAM) as s:
157 if HAVE_UNIX_SOCKETS and proto == socket.AF_UNIX:
158 s.bind(self.pickaddr(proto))
159 s.sendto(TEST_STR, addr)
160 buf = data = receive(s, 100)
161 while data and b'\n' not in buf:
162 data = receive(s, 100)
163 buf += data
164 self.assertEqual(buf, TEST_STR)
165
166 def test_TCPServer(self):
167 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