#NEWLINE# def test_defaulted_init( self ) : #NEWLINE# #INDENT# class X ( object ) : #NEWLINE# #INDENT# def __init__( self_ , a , b = 123 , c = 'abc' ) : #NEWLINE# #INDENT# self_ . a = a #NEWLINE# self_ . b = b #NEWLINE# self_ . c = c #NEWLINE# #UNINDENT# #UNINDENT# instrumentation . register_class ( X ) #NEWLINE# o = X ( 'foo' ) #NEWLINE# eq_ ( self . a , 'foo' ) #NEWLINE# eq_ ( o . b , 123 ) #NEWLINE# eq_ ( o . c , 'abc' ) #NEWLINE# class Y ( object ) : #NEWLINE# #INDENT# unique = object ( ) #NEWLINE# class OutOfScopeForEval ( object ) : #NEWLINE# #INDENT# def __repr__( self_ ) : #NEWLINE# #INDENT# return '123' #NEWLINE# #UNINDENT# #UNINDENT# outofscope = OutOfScopeForEval ( ) #NEWLINE# def __init__( self_ , u = unique , o = outofscope ) : #NEWLINE# #INDENT# self_ . u = u #NEWLINE# self_ . o = o #NEWLINE# #UNINDENT# #UNINDENT# instrumentation . register_class ( Y ) #NEWLINE# o = Y ( ) #NEWLINE# assert ( o . u is Y . unique ) #NEWLINE# assert ( o . o is Y . outofscope )