#NEWLINE# def test_install_magic_magic( ) : #NEWLINE# #INDENT# kernel = get_kernel ( EvalKernel ) #NEWLINE# kernel . do_execute ( '%install_magic https://raw.githubusercontent.com/calysto/metakernel/master/metakernel/magics/cd_magic.py' ) #NEWLINE# text = get_log_text ( kernel ) #NEWLINE# assert re . match ( ".*Downloaded '.*ipython/metakernel/magics/cd_magic.py'" , text , ( re . DOTALL | re . M ) ) , 'Not downloaded' #NEWLINE# assert os . path . isfile ( filename ) , ( 'File not found: %s' % filename )