From 56103c52e7142d7f4d57d3b9690caaf8db15d48a Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Wed, 24 May 2023 09:09:40 +0100 Subject: [PATCH] Ensure we log any OptionList messages in the messages test We don't actually want to see them, we don't expect to see them, so here I make a point of logging them so we can be sure we *don't* see them. --- tests/selection_list/test_selection_messages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/selection_list/test_selection_messages.py b/tests/selection_list/test_selection_messages.py index 3e6041200..9736cb151 100644 --- a/tests/selection_list/test_selection_messages.py +++ b/tests/selection_list/test_selection_messages.py @@ -11,7 +11,7 @@ from __future__ import annotations from textual import on from textual.app import App, ComposeResult from textual.messages import Message -from textual.widgets import SelectionList +from textual.widgets import OptionList, SelectionList class SelectionListApp(App[None]): @@ -24,6 +24,8 @@ class SelectionListApp(App[None]): def compose(self) -> ComposeResult: yield SelectionList[int](*[(str(n), n) for n in range(10)]) + @on(OptionList.OptionHighlighted) + @on(OptionList.OptionSelected) @on(SelectionList.SelectionHighlighted) @on(SelectionList.SelectionToggled) @on(SelectionList.SelectedChanged)