#NEWLINE# def test_conditional_member_initialization( self ) : #NEWLINE# #INDENT# class C_conditional_member_initialization ( object ) : #NEWLINE# #INDENT# def __init__( self , x ) : #NEWLINE# #INDENT# if ( x > 0 ) : #NEWLINE# #INDENT# self . x = x #NEWLINE# #UNINDENT# #UNINDENT# def __str__( self ) : #NEWLINE# #INDENT# return ( 'C_conditional_member_initialization(x=%s)' % self . x ) #NEWLINE# #UNINDENT# #UNINDENT# def f( x ) : #NEWLINE# #INDENT# return C_conditional_member_initialization ( x ) #NEWLINE# #UNINDENT# c0 = f ( 1 ) #NEWLINE# c1 = self . evaluateWithExecutor ( f , 1 ) #NEWLINE# c2 = f ( ( - 1 ) ) #NEWLINE# c3 = self . evaluateWithExecutor ( f , ( - 1 ) ) #NEWLINE# self . assertEqual ( c0 . __dict__ , c1 . __dict__ ) #NEWLINE# self . assertEqual ( c2 . __dict__ , c3 . __dict__ )