mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Test to ensure correct exception raised when converting to cell key from coordinate in DataTable
This commit is contained in:
@@ -379,6 +379,14 @@ async def test_coordinate_to_cell_key():
|
|||||||
assert cell_key == CellKey(row_key, column_key)
|
assert cell_key == CellKey(row_key, column_key)
|
||||||
|
|
||||||
|
|
||||||
|
async def test_coordinate_to_cell_key_invalid_coordinate():
|
||||||
|
app = DataTableApp()
|
||||||
|
async with app.run_test():
|
||||||
|
table = app.query_one(DataTable)
|
||||||
|
with pytest.raises(CellDoesNotExist):
|
||||||
|
table.coordinate_to_cell_key(Coordinate(9999, 9999))
|
||||||
|
|
||||||
|
|
||||||
def test_key_equals_equivalent_string():
|
def test_key_equals_equivalent_string():
|
||||||
text = "Hello"
|
text = "Hello"
|
||||||
key = RowKey(text)
|
key = RowKey(text)
|
||||||
|
|||||||
Reference in New Issue
Block a user