#NEWLINE# @ isolate_ipython0 #NEWLINE# def test_magic( ) : #NEWLINE# #INDENT# ' Test the magic expansion and history.\n    \n        This test is fairly fragile and will break when magics change.\n    ' #NEWLINE# f = TestPrefilterFrontEnd ( ) #NEWLINE# f . input_buffer += '%reset -f' #NEWLINE# f . _on_enter ( ) #NEWLINE# f . complete_current_input ( ) #NEWLINE# f . input_buffer += '%who' #NEWLINE# f . _on_enter ( ) #NEWLINE# out_value = f . out . getvalue ( ) #NEWLINE# assert_equal ( out_value , 'Interactive namespace is empty.\n' )