def test_edit_cell():
    '%edit [cell id]'
    ip = get_ipython()
    ip.run_cell(u'def foo(): return 1', store_history=True)
    _run_edit_test('1', exp_contents=ip.user_ns['In'][1], exp_is_temp=True)
%edit [cell id]
def test_edit_cell():
    
    ip = get_ipython()
    ip.run_cell(u'def foo(): return 1', store_history=True)
    _run_edit_test('1', exp_contents=ip.user_ns['In'][1], exp_is_temp=True)