MCPcopy Create free account
hub / github.com/ipython/ipython / test_attrs

Function test_attrs

IPython/utils/tests/test_tokenutil.py:90–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 expect_token(expected, cell, i)
89
90def test_attrs():
91 cell = "a = obj.attr.subattr"
92 expected = 'obj'
93 idx = cell.find('obj') + 1
94 for i in range(idx, idx + 3):
95 expect_token(expected, cell, i)
96 idx = cell.find('.attr') + 2
97 expected = 'obj.attr'
98 for i in range(idx, idx + 4):
99 expect_token(expected, cell, i)
100 idx = cell.find('.subattr') + 2
101 expected = 'obj.attr.subattr'
102 for i in range(idx, len(cell)):
103 expect_token(expected, cell, i)
104
105def test_line_at_cursor():
106 cell = ""

Callers

nothing calls this directly

Calls 2

expect_tokenFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected