From 2d498d516d8ed10c8009789e3db5edb448d5afc7 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 24 Jan 2023 13:04:49 +0000 Subject: [PATCH] Remove pauses from DataTable tests --- tests/test_data_table.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/test_data_table.py b/tests/test_data_table.py index e1203f55d..9092c7909 100644 --- a/tests/test_data_table.py +++ b/tests/test_data_table.py @@ -58,52 +58,44 @@ async def test_datatable_message_emission(): # therefore no highlighted cells), but then a row was added, and # so the cell at (0, 0) became highlighted. expected_messages.append("CellHighlighted") - await pilot.pause(2 / 100) assert messages == expected_messages # Pressing Enter when the cursor is on a cell emits a CellSelected await pilot.press("enter") expected_messages.append("CellSelected") - await pilot.pause(2 / 100) assert messages == expected_messages # Moving the cursor left and up when the cursor is at origin # emits no events, since the cursor doesn't move at all. await pilot.press("left", "up") - await pilot.pause(2 / 100) assert messages == expected_messages # ROW CURSOR # Switch over to the row cursor... should emit a `RowHighlighted` table.cursor_type = "row" expected_messages.append("RowHighlighted") - await pilot.pause(2 / 100) assert messages == expected_messages # Select the row... await pilot.press("enter") expected_messages.append("RowSelected") - await pilot.pause(2 / 100) assert messages == expected_messages # COLUMN CURSOR # Switching to the column cursor emits a `ColumnHighlighted` table.cursor_type = "column" expected_messages.append("ColumnHighlighted") - await pilot.pause(2 / 100) assert messages == expected_messages # Select the column... await pilot.press("enter") expected_messages.append("ColumnSelected") - await pilot.pause(2 / 100) assert messages == expected_messages # NONE CURSOR # No messages get emitted at all... table.cursor_type = "none" await pilot.press("up", "down", "left", "right", "enter") - await pilot.pause(2 / 100) # No new messages since cursor not visible assert messages == expected_messages @@ -113,7 +105,6 @@ async def test_datatable_message_emission(): table.show_cursor = False table.cursor_type = "cell" await pilot.press("up", "down", "left", "right", "enter") - await pilot.pause(2 / 100) # No new messages since show_cursor = False assert messages == expected_messages @@ -121,7 +112,6 @@ async def test_datatable_message_emission(): # message should be emitted for highlighting the cell. table.show_cursor = True expected_messages.append("CellHighlighted") - await pilot.pause(2 / 100) assert messages == expected_messages # Likewise, if the cursor_type is "none", and we change the @@ -129,7 +119,6 @@ async def test_datatable_message_emission(): # the cursor is still not visible to the user. table.cursor_type = "none" await pilot.press("up", "down", "left", "right", "enter") - await pilot.pause(2 / 100) assert messages == expected_messages