From b1443c01622f6bd5f3eaa75950d9732c177613a4 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 4 May 2023 15:22:30 +0100 Subject: [PATCH] Test that radioset wraps around when going off the top --- tests/toggles/test_radioset.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/toggles/test_radioset.py b/tests/toggles/test_radioset.py index 20980b8d9..66140e252 100644 --- a/tests/toggles/test_radioset.py +++ b/tests/toggles/test_radioset.py @@ -66,7 +66,13 @@ async def test_radioset_inner_navigation(): async with RadioSetApp().run_test() as pilot: assert pilot.app.screen.focused is None await pilot.press("tab") - for key, landing in (("down", 1), ("up", 0), ("right", 1), ("left", 0)): + for key, landing in ( + ("down", 1), + ("up", 0), + ("right", 1), + ("left", 0), + ("up", 2), + ): await pilot.press(key, "enter") assert ( pilot.app.query_one("#from_buttons", RadioSet).pressed_button