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

Function test_toggle_title

tests/test_collapsible.py:103–118  ·  view source on GitHub ↗

Clicking title should update ``collapsed``.

()

Source from the content-addressed store, hash-verified

101
102
103async def test_toggle_title():
104 """Clicking title should update ``collapsed``."""
105
106 class CollapsibleApp(App[None]):
107 def compose(self) -> ComposeResult:
108 yield Collapsible(collapsed=False)
109
110 async with CollapsibleApp().run_test() as pilot:
111 collapsible = pilot.app.query_one(Collapsible)
112 assert not collapsible.collapsed
113
114 await pilot.click(CollapsibleTitle)
115 assert collapsible.collapsed
116
117 await pilot.click(CollapsibleTitle)
118 assert not collapsible.collapsed
119
120
121async def test_toggle_message():

Callers

nothing calls this directly

Calls 4

run_testMethod · 0.80
query_oneMethod · 0.80
clickMethod · 0.80
CollapsibleAppClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…