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

Function test_child_refresh

tests/tree/test_node_refresh.py:48–55  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

46 assert (0, 1) in pilot.app.query_one(HistoryTree).render_hits
47
48async def test_child_refresh() -> None:
49 """A refresh of the child node should cause a subsequent render call."""
50 async with RefreshApp().run_test() as pilot:
51 assert (1, 1) not in pilot.app.query_one(HistoryTree).render_hits
52 pilot.app.query_one(HistoryTree).counter += 1
53 pilot.app.query_one(HistoryTree).root.children[0].refresh()
54 await pilot.pause()
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."""

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…