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

Class EPipeSocket

Lib/test/test_httplib.py:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 pass
86
87class EPipeSocket(FakeSocket):
88
89 def __init__(self, text, pipe_trigger):
90 # When sendall() is called with pipe_trigger, raise EPIPE.
91 FakeSocket.__init__(self, text)
92 self.pipe_trigger = pipe_trigger
93
94 def sendall(self, data):
95 if self.pipe_trigger in data:
96 raise OSError(errno.EPIPE, "gotcha")
97 self.data += data
98
99 def close(self):
100 pass
101
102class NoEOFBytesIO(io.BytesIO):
103 """Like BytesIO, but raises AssertionError on EOF.

Callers 1

test_epipeMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_epipeMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…