Skip to content

Commit 560d790

Browse files
aisktonghuarootStanFromIreland
authored
[3.15] gh-161555: Fix test_heapq under global lazy imports (GH-161556) (#161598)
(cherry picked from commit 0e98aea) Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent dab5e65 commit 560d790

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Lib/test/test_heapq.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def load_tests(loader, tests, ignore):
3939
class HeapqMergeDocTestFinder:
4040
def find(self, *args, **kwargs):
4141
dtf = doctest.DocTestFinder()
42-
return dtf.find(py_heapq.merge)
42+
return dtf.find(py_heapq.merge, globs=py_heapq.__dict__)
4343

4444
tests.addTests(doctest.DocTestSuite(py_heapq,
4545
test_finder=HeapqMergeDocTestFinder()))

0 commit comments

Comments
 (0)