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

Function check_find

IPython/core/tests/test_inputtransformer2.py:154–163  ·  view source on GitHub ↗
(transformer, case, match=True)

Source from the content-addressed store, hash-verified

152 nt.assert_not_equal(make_tokens_by_line(c+k)[-1], [])
153
154def check_find(transformer, case, match=True):
155 sample, expected_start, _ = case
156 tbl = make_tokens_by_line(sample)
157 res = transformer.find(tbl)
158 if match:
159 # start_line is stored 0-indexed, expected values are 1-indexed
160 nt.assert_equal((res.start_line+1, res.start_col), expected_start)
161 return res
162 else:
163 nt.assert_is(res, None)
164
165def check_transform(transformer_cls, case):
166 lines, start, expected = 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