From 6d888af723f6ac53e25f66d6a8f4439096c49034 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 14 Feb 2023 13:22:07 +0000 Subject: [PATCH] Testing DataTable.get_column with invalid column key --- tests/test_data_table.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_data_table.py b/tests/test_data_table.py index 123e7f75d..bf072bd0b 100644 --- a/tests/test_data_table.py +++ b/tests/test_data_table.py @@ -423,6 +423,14 @@ async def test_get_column(): next(cells) +async def test_get_column_invalid_key(): + app = DataTableApp() + async with app.run_test(): + table = app.query_one(DataTable) + with pytest.raises(ColumnDoesNotExist): + list(table.get_column("INVALID")) + + async def test_update_cell_cell_exists(): app = DataTableApp() async with app.run_test():