#NEWLINE# def test_arguments( self ) : #NEWLINE# #INDENT# def one( a , b , c , d , * extra ) : #NEWLINE# #INDENT# return reduce ( ( lambda r , x : ( r + x ) ) , extra , ( ( ( a + b ) + c ) + d ) ) #NEWLINE# #UNINDENT# m = list ( ( ( self , ) for x in xrange ( 100 , 0 , ( - 1 ) ) ) ) . pop #NEWLINE# value = one ( m ( ) , m ( ) , m ( ) , m ( ) ) #NEWLINE# assert ( value == ( 1 , 2 , 3 , 4 ) ) , ( 'simple call, got: %s ' % ( value , ) ) #NEWLINE# value = one ( m ( ) , m ( ) , d = m ( ) , c = m ( ) ) #NEWLINE# assert ( value == ( 5 , 6 , 8 , 7 ) ) , ( 'call with keywords, got: %s' % ( value , ) ) #NEWLINE# value = one ( m ( ) , m ( ) , m ( ) , m ( ) , m ( ) , m ( ) ) #NEWLINE# assert ( value == ( 9 , 10 , 11 , 12 , 13 , 14 ) ) , ( 'long call, got: %s' % ( value , ) ) #NEWLINE# value = one ( m ( ) , m ( ) , * [ m ( ) , m ( ) , m ( ) , m ( ) ] ) #NEWLINE# assert ( value == ( 15 , 16 , 17 , 18 , 19 , 20 ) ) , ( 'varcalls, got: %s' % ( value , ) ) #NEWLINE# value = one ( m ( ) , m ( ) , ** dict ( c = m ( ) , d = m ( ) ) ) #NEWLINE# assert ( value == ( 21 , 22 , 23 , 24 ) ) , ( 'varkeywordcall, got: %s' % ( value , ) ) #NEWLINE# value = one ( * [ m ( ) , m ( ) ] , ** dict ( c = m ( ) , d = m ( ) ) ) #NEWLINE# assert ( value == ( 25 , 26 , 27 , 28 ) ) , ( 'bothvarcalls, got: %s' % ( value , ) )