test RichOutput.display This is a bit circular, because we are actually using the capture code we are testing to test itself.
()
| 107 | |
| 108 | |
| 109 | def test_rich_output_display(): |
| 110 | """test RichOutput.display |
| 111 | |
| 112 | This is a bit circular, because we are actually using the capture code we are testing |
| 113 | to test itself. |
| 114 | """ |
| 115 | data = full_data |
| 116 | rich = capture.RichOutput(data=data) |
| 117 | with capture.capture_output() as cap: |
| 118 | rich.display() |
| 119 | assert len(cap.outputs) == 1 |
| 120 | rich2 = cap.outputs[0] |
| 121 | assert rich2.data == rich.data |
| 122 | assert rich2.metadata == rich.metadata |
| 123 | |
| 124 | |
| 125 | def test_capture_output(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…