mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Testing DataTable.get_column_at
This commit is contained in:
@@ -431,6 +431,17 @@ async def test_get_column_invalid_key():
|
|||||||
list(table.get_column("INVALID"))
|
list(table.get_column("INVALID"))
|
||||||
|
|
||||||
|
|
||||||
|
async def test_get_column_at():
|
||||||
|
app = DataTableApp()
|
||||||
|
async with app.run_test():
|
||||||
|
table = app.query_one(DataTable)
|
||||||
|
table.add_columns("A", "B")
|
||||||
|
table.add_rows(ROWS)
|
||||||
|
|
||||||
|
first_column = list(table.get_column_at(0))
|
||||||
|
assert first_column == [ROWS[0][0], ROWS[1][0], ROWS[2][0]]
|
||||||
|
|
||||||
|
|
||||||
async def test_update_cell_cell_exists():
|
async def test_update_cell_cell_exists():
|
||||||
app = DataTableApp()
|
app = DataTableApp()
|
||||||
async with app.run_test():
|
async with app.run_test():
|
||||||
|
|||||||
Reference in New Issue
Block a user