#NEWLINE# def test_references_by_ref_by_value( self ) : #NEWLINE# #INDENT# from bokeh.core.properties import HasProps , Instance , Int #NEWLINE# class T ( self . pObjectClass ) : #NEWLINE# #INDENT# t = Int ( 0 ) #NEWLINE# #UNINDENT# class Y ( self . pObjectClass ) : #NEWLINE# #INDENT# t1 = Instance ( T ) #NEWLINE# #UNINDENT# class Z1 ( HasProps ) : #NEWLINE# #INDENT# t2 = Instance ( T ) #NEWLINE# #UNINDENT# class Z2 ( self . pObjectClass ) : #NEWLINE# #INDENT# t2 = Instance ( T ) #NEWLINE# #UNINDENT# class X1 ( self . pObjectClass ) : #NEWLINE# #INDENT# y = Instance ( Y ) #NEWLINE# z1 = Instance ( Z1 ) #NEWLINE# #UNINDENT# class X2 ( self . pObjectClass ) : #NEWLINE# #INDENT# y = Instance ( Y ) #NEWLINE# z2 = Instance ( Z2 ) #NEWLINE# #UNINDENT# ( t1 , t2 ) = ( T ( t = 1 ) , T ( t = 2 ) ) #NEWLINE# y = Y ( t1 = t1 ) #NEWLINE# ( z1 , z2 ) = ( Z1 ( t2 = t2 ) , Z2 ( t2 = t2 ) ) #NEWLINE# x1 = X1 ( y = y , z1 = z1 ) #NEWLINE# x2 = X2 ( y = y , z2 = z2 ) #NEWLINE# self . assertEqual ( x1 . references ( ) , { t1 , y , t2 , x1 } ) #NEWLINE# self . assertEqual ( x2 . references ( ) , { t1 , y , t2 , z2 , x2 } )