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

Method stream_examine

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

Source from the content-addressed store, hash-verified

143 if verbose: print("done")
144
145 def stream_examine(self, proto, addr):
146 with socket.socket(proto, socket.SOCK_STREAM) as s:
147 s.connect(addr)
148 s.sendall(TEST_STR)
149 buf = data = receive(s, 100)
150 while data and b'\n' not in buf:
151 data = receive(s, 100)
152 buf += data
153 self.assertEqual(buf, TEST_STR)
154
155 def dgram_examine(self, proto, addr):
156 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