Get the output as-if no encoding occurred
(self)
| 207 | self._stream = stream |
| 208 | |
| 209 | def get_bytes(self) -> bytes: |
| 210 | """Get the output as-if no encoding occurred""" |
| 211 | data = self._stream.getvalue() |
| 212 | self._stream.seek(0) |
| 213 | self._stream.truncate() |
| 214 | return data.replace(b'\r\n', b'\n') |
| 215 | |
| 216 | def get(self) -> str: |
| 217 | """Get the output assuming it was written as UTF-8 bytes""" |