(label, new_value, new_content_width)
| 749 | ], |
| 750 | ) |
| 751 | async def test_update_cell_at_column_width(label, new_value, new_content_width): |
| 752 | # Initial cell values are length 3. Let's update cell content and ensure |
| 753 | # that the width of the column is correct given the new cell content widths |
| 754 | # and the label of the column the cell is in. |
| 755 | app = DataTableApp() |
| 756 | async with app.run_test(): |
| 757 | table = app.query_one(DataTable) |
| 758 | key, _ = table.add_columns(label, "Column2") |
| 759 | table.add_rows(ROWS) |
| 760 | first_column = table.columns.get(key) |
| 761 | |
| 762 | table.update_cell_at(Coordinate(0, 0), new_value, update_width=True) |
| 763 | await wait_for_idle() |
| 764 | assert first_column.content_width == new_content_width |
| 765 | assert ( |
| 766 | first_column.get_render_width(table) |
| 767 | == new_content_width + 2 * _DEFAULT_CELL_X_PADDING |
| 768 | ) |
| 769 | |
| 770 | |
| 771 | async def test_coordinate_to_cell_key(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…