#NEWLINE# def test_scalar_search_wolfe2( self ) : #NEWLINE# #INDENT# for ( name , phi , derphi , old_phi0 ) in self . scalar_iter ( ) : #NEWLINE# #INDENT# ( s , phi1 , phi0 , derphi1 ) = ls . scalar_search_wolfe2 ( phi , derphi , phi ( 0 ) , old_phi0 , derphi ( 0 ) ) #NEWLINE# assert_fp_equal ( phi0 , phi ( 0 ) , name ) #NEWLINE# assert_fp_equal ( phi1 , phi ( s ) , name ) #NEWLINE# if ( derphi is not None ) : #NEWLINE# #INDENT# assert_fp_equal ( derphi1 , derphi ( s ) , name ) #NEWLINE# #UNINDENT# assert_wolfe ( s , phi , derphi , err_msg = ( '%s %g' % ( name , old_phi0 ) ) )