mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Testing case where you try to update cells which dont exist
This commit is contained in:
@@ -303,6 +303,16 @@ async def test_update_cell_cell_exists():
|
||||
assert table.get_cell_value("1", "A") == "NEW_VALUE"
|
||||
|
||||
|
||||
async def test_update_cell_cell_doesnt_exist():
|
||||
app = DataTableApp()
|
||||
async with app.run_test():
|
||||
table = app.query_one(DataTable)
|
||||
table.add_column("A", key="A")
|
||||
table.add_row("1", key="1")
|
||||
with pytest.raises(CellDoesNotExist):
|
||||
table.update_cell("INVALID", "CELL", "Value")
|
||||
|
||||
|
||||
# TODO: Test update coordinate
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user