Debian Codegraph @

debian/patches/use-unittest-api.patch

raw symbols SCIP
1 Author: Diane Trout <[email protected]>
2 Description: The upstream version was directly using test.support to
3 control how they were running tests, but that module was flagged internal.
4 I attempted to duplicate the behavior using the public unittest api
5
6 --- a/test_heap.py
7 +++ b/test_heap.py
8 @@ -103,15 +103,17 @@
9
10
11 def test_main(verbose=None):
12 - test_classes = [TestHeap]
13 - test_support.run_unittest(*test_classes)
14 + loader = unittest.TestLoader()
15 + suite = loader.loadTestsFromTestCase(TestHeap)
16 + result = unittest.TestResult()
17 + suite.run(result)
18
19 # verify reference counting
20 if verbose and hasattr(sys, "gettotalrefcount"):
21 import gc
22 counts = [None] * 5
23 for i in range(len(counts)):
24 - test_support.run_unittest(*test_classes)
25 + suite.run(result)
26 gc.collect()
27 counts[i] = sys.gettotalrefcount()
28 print(counts)