StringIO that throws an exception when it's read from
| 120 | |
| 121 | |
| 122 | class WriteOnlyStringIO(io.StringIO): |
| 123 | """StringIO that throws an exception when it's read from""" |
| 124 | |
| 125 | def read(self, *args, **kwargs): |
| 126 | raise OSError |
| 127 | |
| 128 | def readline(self, *args, **kwargs): |
| 129 | raise OSError |
| 130 | |
| 131 | def readlines(self, *args, **kwargs): |
| 132 | raise OSError |
| 133 | |
| 134 | def readable(self, *args, **kwargs): |
| 135 | """Returns True if the IO object can be read.""" |
| 136 | return False |
| 137 | |
| 138 | |
| 139 | class redirect_stdin(contextlib._RedirectStream): # type: ignore |
no outgoing calls
no test coverage detected
searching dependent graphs…