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

Function test_root_refresh

tests/tree/test_node_refresh.py:39–46  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

37
38
39async def test_root_refresh() -> None:
40 """A refresh of the root node should cause a subsequent render call."""
41 async with RefreshApp().run_test() as pilot:
42 assert (0, 1) not in pilot.app.query_one(HistoryTree).render_hits
43 pilot.app.query_one(HistoryTree).counter += 1
44 pilot.app.query_one(HistoryTree).root.refresh()
45 await pilot.pause()
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."""

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…