MCPcopy Index your code
hub / github.com/ipython/ipython / test_attrs

Function test_attrs

tests/test_tokenutil.py:134–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def test_attrs():
135 cell = "a = obj.attr.subattr"
136 expected = "obj"
137 idx = cell.find("obj") + 1
138 for i in range(idx, idx + 3):
139 expect_token(expected, cell, i)
140 idx = cell.find(".attr") + 2
141 expected = "obj.attr"
142 for i in range(idx, idx + 4):
143 expect_token(expected, cell, i)
144 idx = cell.find(".subattr") + 2
145 expected = "obj.attr.subattr"
146 for i in range(idx, len(cell)):
147 expect_token(expected, cell, i)
148
149
150def test_line_at_cursor():

Callers

nothing calls this directly

Calls 2

expect_tokenFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…