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

Function test_grandchild_refresh

tests/tree/test_node_refresh.py:57–64  ·  view source on GitHub ↗

A refresh of the grandchild node should cause a subsequent render call.

()

Source from the content-addressed store, hash-verified

55 assert (1, 1) in pilot.app.query_one(HistoryTree).render_hits
56
57async def test_grandchild_refresh() -> None:
58 """A refresh of the grandchild node should cause a subsequent render call."""
59 async with RefreshApp().run_test() as pilot:
60 assert (2, 1) not in pilot.app.query_one(HistoryTree).render_hits
61 pilot.app.query_one(HistoryTree).counter += 1
62 pilot.app.query_one(HistoryTree).root.children[0].children[0].refresh()
63 await pilot.pause()
64 assert (2, 1) in pilot.app.query_one(HistoryTree).render_hits

Callers

nothing calls this directly

Calls 5

run_testMethod · 0.80
query_oneMethod · 0.80
RefreshAppClass · 0.70
refreshMethod · 0.45
pauseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…