#NEWLINE# def test_doesntBleed( self ) : #NEWLINE# #INDENT# '\n        Forcing garbage collection in the test should mean that there are\n        no unreachable cycles immediately after the test completes.\n        ' #NEWLINE# result = reporter . TestResult ( ) #NEWLINE# self . test1 ( result ) #NEWLINE# self . flushLoggedErrors ( ) #NEWLINE# n = gc . collect ( ) #NEWLINE# self . assertEqual ( result , 0 , 'unreachable cycle still existed' ) #NEWLINE# x = self . flushLoggedErrors ( ) #NEWLINE# self . assertEqual ( len ( x ) , 0 , 'Errors logged after gc.collect' )