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

Function test_contains

tests/test_node_list.py:57–64  ·  view source on GitHub ↗

Can we check if a widget is (not) within the list?

()

Source from the content-addressed store, hash-verified

55
56
57async def test_contains():
58 """Can we check if a widget is (not) within the list?"""
59 widget = Widget()
60 nodes = NodeList()
61 assert widget not in nodes
62 nodes._append(widget)
63 assert widget in nodes
64 assert Widget() not in nodes
65
66
67async def test_index():

Callers

nothing calls this directly

Calls 3

_appendMethod · 0.95
WidgetClass · 0.90
NodeListClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…