Author: Diane Trout Description: The upstream version was directly using test.support to control how they were running tests, but that module was flagged internal. I attempted to duplicate the behavior using the public unittest api --- a/test_heap.py +++ b/test_heap.py @@ -103,15 +103,17 @@ def test_main(verbose=None): - test_classes = [TestHeap] - test_support.run_unittest(*test_classes) + loader = unittest.TestLoader() + suite = loader.loadTestsFromTestCase(TestHeap) + result = unittest.TestResult() + suite.run(result) # verify reference counting if verbose and hasattr(sys, "gettotalrefcount"): import gc counts = [None] * 5 for i in range(len(counts)): - test_support.run_unittest(*test_classes) + suite.run(result) gc.collect() counts[i] = sys.gettotalrefcount() print(counts)