MCPcopy Index your code
hub / github.com/python/cpython / load_tests

Function load_tests

Lib/test/test_heapq.py:31–46  ·  view source on GitHub ↗
(loader, tests, ignore)

Source from the content-addressed store, hash-verified

29
30
31def load_tests(loader, tests, ignore):
32 # The 'merge' function has examples in its docstring which we should test
33 # with 'doctest'.
34 #
35 # However, doctest can't easily find all docstrings in the module (loading
36 # it through import_fresh_module seems to confuse it), so we specifically
37 # create a finder which returns the doctests from the merge method.
38
39 class HeapqMergeDocTestFinder:
40 def find(self, *args, **kwargs):
41 dtf = doctest.DocTestFinder()
42 return dtf.find(py_heapq.merge)
43
44 tests.addTests(doctest.DocTestSuite(py_heapq,
45 test_finder=HeapqMergeDocTestFinder()))
46 return tests
47
48class TestHeap:
49

Callers

nothing calls this directly

Calls 2

addTestsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…