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)

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 )
test %magic .