Regression test for https://github.com/Textualize/rich/issues/3517
()
| 364 | |
| 365 | |
| 366 | def test_columns_highlight_added_by_add_row() -> None: |
| 367 | """Regression test for https://github.com/Textualize/rich/issues/3517""" |
| 368 | table = Table(show_header=False, highlight=True) |
| 369 | table.add_row("1", repr("FOO")) |
| 370 | |
| 371 | assert table.columns[0].highlight == table.highlight |
| 372 | assert table.columns[1].highlight == table.highlight |
| 373 | |
| 374 | console = Console(record=True) |
| 375 | console.print(table) |
| 376 | output = console.export_text(styles=True) |
| 377 | print(repr(output)) |
| 378 | |
| 379 | expected = ( |
| 380 | "┌───┬───────┐\n│ \x1b[1;36m1\x1b[0m │ \x1b[32m'FOO'\x1b[0m │\n└───┴───────┘\n" |
| 381 | ) |
| 382 | assert output == expected |
| 383 | |
| 384 | |
| 385 | def test_padding_width(): |