mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
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.
This commit is contained in:
@@ -11,7 +11,7 @@ from __future__ import annotations
|
|||||||
from textual import on
|
from textual import on
|
||||||
from textual.app import App, ComposeResult
|
from textual.app import App, ComposeResult
|
||||||
from textual.messages import Message
|
from textual.messages import Message
|
||||||
from textual.widgets import SelectionList
|
from textual.widgets import OptionList, SelectionList
|
||||||
|
|
||||||
|
|
||||||
class SelectionListApp(App[None]):
|
class SelectionListApp(App[None]):
|
||||||
@@ -24,6 +24,8 @@ class SelectionListApp(App[None]):
|
|||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
yield SelectionList[int](*[(str(n), n) for n in range(10)])
|
yield SelectionList[int](*[(str(n), n) for n in range(10)])
|
||||||
|
|
||||||
|
@on(OptionList.OptionHighlighted)
|
||||||
|
@on(OptionList.OptionSelected)
|
||||||
@on(SelectionList.SelectionHighlighted)
|
@on(SelectionList.SelectionHighlighted)
|
||||||
@on(SelectionList.SelectionToggled)
|
@on(SelectionList.SelectionToggled)
|
||||||
@on(SelectionList.SelectedChanged)
|
@on(SelectionList.SelectedChanged)
|
||||||
|
|||||||
Reference in New Issue
Block a user