(self)
| 1069 | |
| 1070 | @contextlib.contextmanager |
| 1071 | def captured_stdout_with_buffer(self): |
| 1072 | orig_stdout = sys.stdout |
| 1073 | buffer = io.BytesIO() |
| 1074 | sys.stdout = io.TextIOWrapper(buffer) |
| 1075 | try: |
| 1076 | yield sys.stdout |
| 1077 | finally: |
| 1078 | sys.stdout.flush() |
| 1079 | sys.stdout.buffer.seek(0) |
| 1080 | sys.stdout = orig_stdout |
| 1081 | |
| 1082 | @contextlib.contextmanager |
| 1083 | def captured_stderr_with_buffer(self): |
no test coverage detected