capture_output() context works
(self)
| 79 | iostream.close() |
| 80 | |
| 81 | def test_capture_output(self): |
| 82 | """capture_output() context works""" |
| 83 | |
| 84 | with capture_output() as io: |
| 85 | print('hi, stdout') |
| 86 | print('hi, stderr', file=sys.stderr) |
| 87 | |
| 88 | nt.assert_equal(io.stdout, 'hi, stdout\n') |
| 89 | nt.assert_equal(io.stderr, 'hi, stderr\n') |
nothing calls this directly
no test coverage detected