#NEWLINE# def test_summarize( self ) : #NEWLINE# #INDENT# f = SimpleAstropyGaussianFitter ( amplitude = 1 , mean = 2 , stddev = 3 ) #NEWLINE# ( model , fitter ) = f . build_and_fit ( [ 1 , 2 , 3 ] , [ 2 , 3 , 4 ] ) #NEWLINE# expected = [ ( 'Converged in %i iterations' % fitter . fit_info [ 'nfev' ] ) , '' , ( 'amplitude = %e' % model . amplitude . value ) , ( 'mean      = %e' % model . mean . value ) , ( 'stddev    = %e' % model . stddev . value ) ] #NEWLINE# expected = '\n' . join ( expected ) #NEWLINE# actual = f . summarize ( ( model , expected ) , [ 1 , 2 , 3 ] , [ 2 , 3 , 4 ] ) #NEWLINE# assert ( expected == actual )