Test that the control of selection list events is always correct

This commit is contained in:
Dave Pearson
2023-05-24 10:21:40 +01:00
parent 0a63748573
commit cb05cfff53

View File

@@ -30,6 +30,7 @@ class SelectionListApp(App[None]):
@on(SelectionList.SelectionToggled)
@on(SelectionList.SelectedChanged)
def _record(self, event: Message) -> None:
assert event.control == self.query_one(SelectionList)
self.messages.append(
(
event.__class__.__name__,