@dec.skip_without('sqlite3')
def test_macro_run():
    'Test that we can run a multi-line macro successfully.'
    ip = get_ipython()
    ip.history_manager.reset()
    cmds = ['a=10', 'a+=1', 'print(a)', '%macro test 2-3']
    for cmd in cmds:
        ip.run_cell(cmd, store_history=True)
    nt.assert_equal(ip.user_ns['test'].value, 'a+=1\nprint(a)\n')
    with tt.AssertPrints('12'):
        ip.run_cell('test')
    with tt.AssertPrints('13'):
        ip.run_cell('test')
Test that we can run a multi-line macro successfully.
@dec.skip_without('sqlite3')
def test_macro_run():
    
    ip = get_ipython()
    ip.history_manager.reset()
    cmds = ['a=10', 'a+=1', 'print(a)', '%macro test 2-3']
    for cmd in cmds:
        ip.run_cell(cmd, store_history=True)
    nt.assert_equal(ip.user_ns['test'].value, 'a+=1\nprint(a)\n')
    with tt.AssertPrints('12'):
        ip.run_cell('test')
    with tt.AssertPrints('13'):
        ip.run_cell('test')