()
| 205 | |
| 206 | |
| 207 | async def test_add_rows(): |
| 208 | app = DataTableApp() |
| 209 | async with app.run_test(): |
| 210 | table = app.query_one(DataTable) |
| 211 | table.add_columns("A", "B") |
| 212 | row_keys = table.add_rows(ROWS) |
| 213 | # We're given a key for each row |
| 214 | assert len(row_keys) == len(ROWS) |
| 215 | assert len(row_keys) == len(table._data) |
| 216 | assert table.row_count == len(ROWS) |
| 217 | # Each key can be used to fetch a row from the DataTable |
| 218 | assert all(key in table._data for key in row_keys) |
| 219 | |
| 220 | |
| 221 | async def test_add_rows_user_defined_keys(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…