From 50d77b231fb9769cb209fcfcd0b1519cac5d49b2 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 23 May 2023 16:45:53 +0100 Subject: [PATCH] Add tests for the wrong sized tuple While type checking picks this up, not everyone uses type checking. --- tests/selection_list/test_selection_list_create.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/selection_list/test_selection_list_create.py b/tests/selection_list/test_selection_list_create.py index 492b4756b..1a4982c29 100644 --- a/tests/selection_list/test_selection_list_create.py +++ b/tests/selection_list/test_selection_list_create.py @@ -71,3 +71,7 @@ async def test_add_non_selections() -> None: selections.add_option(Option("Nope")) with pytest.raises(SelectionError): selections.add_option("Nope") + with pytest.raises(SelectionError): + selections.add_option(("Nope",)) + with pytest.raises(SelectionError): + selections.add_option(("Nope", 0, False, 23))