MCPcopy
hub / github.com/Textualize/textual / test_switch_click_doesnt_bubble_up

Function test_switch_click_doesnt_bubble_up

tests/test_switch.py:5–18  ·  view source on GitHub ↗

Regression test for https://github.com/Textualize/textual/issues/2366

()

Source from the content-addressed store, hash-verified

3
4
5async def test_switch_click_doesnt_bubble_up():
6 """Regression test for https://github.com/Textualize/textual/issues/2366"""
7
8 class SwitchApp(App[None]):
9 def compose(self) -> ComposeResult:
10 yield Switch()
11
12 async def on_click(self) -> None:
13 raise AssertionError(
14 "The app should never receive a click event when Switch is clicked."
15 )
16
17 async with SwitchApp().run_test() as pilot:
18 await pilot.click(Switch)

Callers

nothing calls this directly

Calls 3

run_testMethod · 0.80
clickMethod · 0.80
SwitchAppClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…