test capture_output(display=False)
()
| 148 | yield nt.assert_equal, len(cap.outputs), 1 |
| 149 | |
| 150 | def test_capture_output_no_display(): |
| 151 | """test capture_output(display=False)""" |
| 152 | rich = capture.RichOutput(data=full_data) |
| 153 | with capture.capture_output(display=False) as cap: |
| 154 | print(hello_stdout, end="") |
| 155 | print(hello_stderr, end="", file=sys.stderr) |
| 156 | rich.display() |
| 157 | yield nt.assert_equal, hello_stdout, cap.stdout |
| 158 | yield nt.assert_equal, hello_stderr, cap.stderr |
| 159 | yield nt.assert_equal, cap.outputs, [] |