%edit on interactively defined objects
()
| 1139 | |
| 1140 | |
| 1141 | def 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 | |
| 1155 | def test_edit_cell(): |
nothing calls this directly
no test coverage detected