test capture_output(display=False)
()
| 159 | |
| 160 | |
| 161 | def test_capture_output_no_display(): |
| 162 | """test capture_output(display=False)""" |
| 163 | data = full_data.copy() |
| 164 | del data["image/png"] |
| 165 | rich = capture.RichOutput(data=data) |
| 166 | with capture.capture_output(display=False) as cap: |
| 167 | print(hello_stdout, end="") |
| 168 | print(hello_stderr, end="", file=sys.stderr) |
| 169 | rich.display() |
| 170 | assert hello_stdout == cap.stdout |
| 171 | assert hello_stderr == cap.stderr |
| 172 | assert cap.outputs == [] |
| 173 | |
| 174 | |
| 175 | def test_captured_io_none_streams(): |