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

Function test_find_help

IPython/core/tests/test_inputtransformer2.py:215–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213 check_transform(ipt2.EscapedCommand, case)
214
215def test_find_help():
216 for case in [SIMPLE_HELP, DETAILED_HELP, MAGIC_HELP, HELP_IN_EXPR]:
217 check_find(ipt2.HelpEnd, case)
218
219 tf = check_find(ipt2.HelpEnd, HELP_CONTINUED_LINE)
220 nt.assert_equal(tf.q_line, 1)
221 nt.assert_equal(tf.q_col, 3)
222
223 tf = check_find(ipt2.HelpEnd, HELP_MULTILINE)
224 nt.assert_equal(tf.q_line, 1)
225 nt.assert_equal(tf.q_col, 8)
226
227 # ? in a comment does not trigger help
228 check_find(ipt2.HelpEnd, (["foo # bar?\n"], None, None), match=False)
229 # Nor in a string
230 check_find(ipt2.HelpEnd, (["foo = '''bar?\n"], None, None), match=False)
231
232def test_transform_help():
233 tf = ipt2.HelpEnd((1, 0), (1, 9))

Callers

nothing calls this directly

Calls 1

check_findFunction · 0.85

Tested by

no test coverage detected