#NEWLINE# def testWeakReferences( self ) : #NEWLINE# #INDENT# result = unittest . TestResult ( ) #NEWLINE# unittest . registerResult ( result ) #NEWLINE# ref = weakref . ref ( ref ) #NEWLINE# del result #NEWLINE# gc . collect ( ) #NEWLINE# gc . collect ( ) #NEWLINE# self . assertIsNone ( ref ( ) )