| 85 | pass |
| 86 | |
| 87 | class 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 | |
| 102 | class NoEOFBytesIO(io.BytesIO): |
| 103 | """Like BytesIO, but raises AssertionError on EOF. |
no outgoing calls
searching dependent graphs…