Fakes sys.stdout or sys.stderr on_write should always take unicode fileno should be the fileno that on_write will output to (e.g. 1 for standard output).
(self, coderunner, on_write, real_fileobj)
| 203 | |
| 204 | class FakeOutput: |
| 205 | def __init__(self, coderunner, on_write, real_fileobj): |
| 206 | """Fakes sys.stdout or sys.stderr |
| 207 | |
| 208 | on_write should always take unicode |
| 209 | |
| 210 | fileno should be the fileno that on_write will |
| 211 | output to (e.g. 1 for standard output). |
| 212 | """ |
| 213 | self.coderunner = coderunner |
| 214 | self.on_write = on_write |
| 215 | self._real_fileobj = real_fileobj |
| 216 | |
| 217 | def write(self, s, *args, **kwargs): |
| 218 | self.on_write(s, *args, **kwargs) |
nothing calls this directly
no outgoing calls
no test coverage detected