#NEWLINE# def test_clone_deep_baz_ref( self ) : #NEWLINE# #INDENT# baz = BazRef ( ) #NEWLINE# for name in [ 'a' , 'b' , 'c' , 'd' ] : #NEWLINE# #INDENT# baz . bars . append ( Bar ( name = name ) ) #NEWLINE# #UNINDENT# deep_baz = DeepBazBazRef ( baz = baz ) #NEWLINE# deep_baz_copy = deep_baz . clone_traits ( ) #NEWLINE# self . assertIsNot ( deep_baz_copy , deep_baz ) #NEWLINE# self . assertIsNot ( deep_baz_copy . baz , deep_baz . baz ) #NEWLINE# baz_copy = deep_baz_copy . baz #NEWLINE# self . assertIsNot ( baz_copy , baz ) #NEWLINE# self . assertIsNot ( baz_copy . bars , baz . bars ) #NEWLINE# self . assertEqual ( len ( baz_copy . bars ) , len ( baz . bars ) ) #NEWLINE# for bar in baz . bars : #NEWLINE# #INDENT# self . assertIn ( bar , baz_copy . bars ) #NEWLINE# #UNINDENT# return