def test_noReference(self):
        """
        Test that no reference is kept on a successful test.
        """
        test = self.__class__('test_successful')
        ref = weakref.ref(test)
        test.run(self.result)
        self.assertSuccessful(test, self.result)
        del test
        gc.collect()
        self.assertIdentical(ref(), None)

        Test that no reference is kept on a successful test.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_tests.py