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

Function test_listy

tests/test_node_list.py:103–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101
102
103async def test_listy():
104 nodes = NodeList()
105 widget1 = Widget()
106 widget2 = Widget()
107 nodes._append(widget1)
108 nodes._append(widget2)
109 assert list(nodes) == [widget1, widget2]
110 assert list(reversed(nodes)) == [widget2, widget1]
111 assert nodes[0] == widget1
112 assert nodes[1] == widget2
113 assert nodes[0:2] == [widget1, widget2]

Callers

nothing calls this directly

Calls 3

_appendMethod · 0.95
NodeListClass · 0.90
WidgetClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…