def test_magic_magic():
    'Test %magic'
    ip = get_ipython()
    with capture_output() as captured:
        ip.magic('magic')
    stdout = captured.stdout
    nt.assert_in('%magic', stdout)
    nt.assert_in('IPython', stdout)
    nt.assert_in('Available', stdout)
Test %magic
def test_magic_magic():
    
    ip = get_ipython()
    with capture_output() as captured:
        ip.magic('magic')
    stdout = captured.stdout
    nt.assert_in('%magic', stdout)
    nt.assert_in('IPython', stdout)
    nt.assert_in('Available', stdout)