https://github.com/python/cpython/commit/0e98aea32593e39c647c2b3d7054ec4e36bf643a commit: 0e98aea32593e39c647c2b3d7054ec4e36bf643a branch: main author: tonghuaroot (童话) <[email protected]> committer: StanFromIreland <[email protected]> date: 2026-11-07T20:00:57Z summary:
gh-161555: Fix `test_heapq` under global lazy imports (#161556) Co-authored-by: Stan Ulbrych <[email protected]> files: M Lib/test/lazy_imports_all_exclude.txt M Lib/test/test_heapq.py diff --git a/Lib/test/lazy_imports_all_exclude.txt b/Lib/test/lazy_imports_all_exclude.txt index 45796d1db9f0a5..8d303858139b9f 100644 --- a/Lib/test/lazy_imports_all_exclude.txt +++ b/Lib/test/lazy_imports_all_exclude.txt @@ -24,7 +24,6 @@ test_clinic test_crossinterp test_datetime test_generated_cases -test_heapq test_import test_importlib test_json diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py index d6623fee9bb2b4..0d288caeabc8ed 100644 --- a/Lib/test/test_heapq.py +++ b/Lib/test/test_heapq.py @@ -39,7 +39,7 @@ def load_tests(loader, tests, ignore): class HeapqMergeDocTestFinder: def find(self, *args, **kwargs): dtf = doctest.DocTestFinder() - return dtf.find(py_heapq.merge) + return dtf.find(py_heapq.merge, globs=py_heapq.__dict__) tests.addTests(doctest.DocTestSuite(py_heapq, test_finder=HeapqMergeDocTestFinder())) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
