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

Function test_assemble_python_lines

IPython/core/tests/test_inputtransformer.py:377–400  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

375 transform_checker(example, ipt.assemble_logical_lines)
376
377def test_assemble_python_lines():
378 tests = \
379 [ [(u"a = '''", None),
380 (u"abc'''", u"a = '''\nabc'''"),
381 ],
382 [(u"a = '''", None), # Test resetting when within a multi-line string
383 (u"def", None),
384 (None, u"a = '''\ndef"),
385 ],
386 [(u"a = [1,", None),
387 (u"2]", u"a = [1,\n2]"),
388 ],
389 [(u"a = [1,", None), # Test resetting when within a multi-line string
390 (u"2,", None),
391 (None, u"a = [1,\n2,"),
392 ],
393 [(u"a = '''", None), # Test line continuation within a multi-line string
394 (u"abc\\", None),
395 (u"def", None),
396 (u"'''", u"a = '''\nabc\\\ndef\n'''"),
397 ],
398 ] + syntax_ml['multiline_datastructure']
399 for example in tests:
400 transform_checker(example, ipt.assemble_python_lines)
401
402
403def test_help_end():

Callers

nothing calls this directly

Calls 1

transform_checkerFunction · 0.85

Tested by

no test coverage detected