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

Function check_find

tests/test_inputtransformer2.py:191–200  ·  view source on GitHub ↗
(transformer, case, match=True)

Source from the content-addressed store, hash-verified

189
190
191def check_find(transformer, case, match=True):
192 sample, expected_start, _ = case
193 tbl = make_tokens_by_line(sample)
194 res = transformer.find(tbl)
195 if match:
196 # start_line is stored 0-indexed, expected values are 1-indexed
197 assert (res.start_line + 1, res.start_col) == expected_start
198 return res
199 else:
200 assert res is None
201
202
203def check_transform(transformer_cls, case):

Callers 5

test_find_assign_magicFunction · 0.85
test_find_assign_systemFunction · 0.85
test_find_magic_escapeFunction · 0.85
test_find_autocallsFunction · 0.85
test_find_helpFunction · 0.85

Calls 2

make_tokens_by_lineFunction · 0.90
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…