#NEWLINE# def test_returnClassObjectWithClosure( self ) : #NEWLINE# #INDENT# x = 10 #NEWLINE# class ReturnedClass3 ( ) : #NEWLINE# #INDENT# def f( self , y ) : #NEWLINE# #INDENT# return ( x + y ) #NEWLINE# #UNINDENT# #UNINDENT# def f( ) : #NEWLINE# #INDENT# return ReturnedClass3 #NEWLINE# #UNINDENT# def comparisonFunction( pyforaVal , pythonVal ) : #NEWLINE# #INDENT# return ( pyforaVal ( ) . f ( 10 ) == pythonVal ( ) . f ( 10 ) ) #NEWLINE# #UNINDENT# self . equivalentEvaluationTest ( f , comparisonFunction = comparisonFunction )