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

Method stream_examine

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

Source from the content-addressed store, hash-verified

145 if verbose: print("done")
146
147 def stream_examine(self, proto, addr):
148 with socket.socket(proto, socket.SOCK_STREAM) as s:
149 s.connect(addr)
150 s.sendall(TEST_STR)
151 buf = data = receive(s, 100)
152 while data and b'\n' not in buf:
153 data = receive(s, 100)
154 buf += data
155 self.assertEqual(buf, TEST_STR)
156
157 def dgram_examine(self, proto, addr):
158 with socket.socket(proto, socket.SOCK_DGRAM) as s:

Callers

nothing calls this directly

Calls 5

receiveFunction · 0.85
socketMethod · 0.80
connectMethod · 0.45
sendallMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected