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

Function test_length_hint

tests/test_node_list.py:19–26  ·  view source on GitHub ↗

Check length hint dunder method.

()

Source from the content-addressed store, hash-verified

17
18
19async def test_length_hint():
20 """Check length hint dunder method."""
21 nodes = NodeList()
22 assert nodes.__length_hint__() == 0
23 nodes._append(Widget())
24 nodes._append(Widget())
25 nodes._append(Widget())
26 assert nodes.__length_hint__() == 3
27
28
29async def test_repeat_add_one():

Callers

nothing calls this directly

Calls 4

__length_hint__Method · 0.95
_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…