test capture_output(stderr=False)
()
| 136 | yield nt.assert_equal, len(cap.outputs), 1 |
| 137 | |
| 138 | def test_capture_output_no_stderr(): |
| 139 | """test capture_output(stderr=False)""" |
| 140 | rich = capture.RichOutput(data=full_data) |
| 141 | # add nested capture_output so stderr doesn't make it to nose output |
| 142 | with capture.capture_output(), capture.capture_output(stderr=False) as cap: |
| 143 | print(hello_stdout, end="") |
| 144 | print(hello_stderr, end="", file=sys.stderr) |
| 145 | rich.display() |
| 146 | yield nt.assert_equal, hello_stdout, cap.stdout |
| 147 | yield nt.assert_equal, "", cap.stderr |
| 148 | yield nt.assert_equal, len(cap.outputs), 1 |
| 149 | |
| 150 | def test_capture_output_no_display(): |
| 151 | """test capture_output(display=False)""" |