'Forcing garbage collection in the test should mean that there are
no unreachable cycles immediately after the test completes.'

def test_doesntBleed(self):

    result = reporter.TestResult()
    self.test1(result)
    self.flushLoggedErrors()
    if _PY3:
        n = len(gc.garbage)
    else:
        n = gc.collect()
    self.assertEqual(n, 0, 'unreachable    cycle    still    existed')
    x = self.flushLoggedErrors()
    self.assertEqual(len(x), 0, 'Errors    logged    after    gc.collect')
