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

Function test_repeat_add_one

tests/test_node_list.py:29–35  ·  view source on GitHub ↗

Does adding the same item to the node list ignore the additional adds?

()

Source from the content-addressed store, hash-verified

27
28
29async def test_repeat_add_one():
30 """Does adding the same item to the node list ignore the additional adds?"""
31 nodes = NodeList()
32 widget = Widget()
33 for _ in range(1000):
34 nodes._append(widget)
35 assert len(nodes) == 1
36
37
38async def test_insert():

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…