#NEWLINE# def test_assignment_maintains_owners( self ) : #NEWLINE# #INDENT# obj = HasStringDictProp ( ) #NEWLINE# old_dict = obj . foo #NEWLINE# self . assertTrue ( isinstance ( old_dict , PropertyValueDict ) ) #NEWLINE# self . assertEqual ( 1 , len ( old_dict . _owners ) ) #NEWLINE# obj . foo = dict ( a = 1 ) #NEWLINE# new_dict = obj . foo #NEWLINE# self . assertTrue ( isinstance ( new_dict , PropertyValueDict ) ) #NEWLINE# self . assertIsNot ( old_dict , new_dict ) #NEWLINE# self . assertEqual ( 0 , len ( old_dict . _owners ) ) #NEWLINE# self . assertEqual ( 1 , len ( new_dict . _owners ) )