()
| 210 | |
| 211 | |
| 212 | def test_section(): |
| 213 | table = Table("foo") |
| 214 | table.add_section() # Null-op |
| 215 | table.add_row("row1") |
| 216 | table.add_row("row2", end_section=True) |
| 217 | table.add_row("row3") |
| 218 | table.add_row("row4") |
| 219 | table.add_section() |
| 220 | table.add_row("row5") |
| 221 | table.add_section() # Null-op |
| 222 | |
| 223 | console = Console( |
| 224 | width=80, |
| 225 | force_terminal=True, |
| 226 | color_system="truecolor", |
| 227 | legacy_windows=False, |
| 228 | record=True, |
| 229 | ) |
| 230 | console.print(table) |
| 231 | output = console.export_text() |
| 232 | print(repr(output)) |
| 233 | expected = "┏━━━━━━┓\n┃ foo ┃\n┡━━━━━━┩\n│ row1 │\n│ row2 │\n├──────┤\n│ row3 │\n│ row4 │\n├──────┤\n│ row5 │\n└──────┘\n" |
| 234 | |
| 235 | assert output == expected |
| 236 | |
| 237 | |
| 238 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…