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

Function test_edit_interactive

IPython/core/tests/test_magic.py:1141–1152  ·  view source on GitHub ↗

%edit on interactively defined objects

()

Source from the content-addressed store, hash-verified

1139
1140
1141def test_edit_interactive():
1142 """%edit on interactively defined objects"""
1143 ip = get_ipython()
1144 n = ip.execution_count
1145 ip.run_cell(u"def foo(): return 1", store_history=True)
1146
1147 try:
1148 _run_edit_test("foo")
1149 except code.InteractivelyDefined as e:
1150 nt.assert_equal(e.index, n)
1151 else:
1152 raise AssertionError("Should have raised InteractivelyDefined")
1153
1154
1155def test_edit_cell():

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
_run_edit_testFunction · 0.85
run_cellMethod · 0.45

Tested by

no test coverage detected