[3.13] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) (GH-120669)
Mocking only works if sys.modules['pydoc'] and pydoc are the same, but some pydoc functions reload the module and change sys.modules. Ensure that sys.modules['pydoc'] is always restored after the corresponding tests. (cherry picked from commit 2cf47389e26cb591342d07dad98619916d5a1b15) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
M
Miss Islington (bot) committed
451cb71cc820cce5f250c507cecf15d34f181157
Parent: 71ad34d
Committed by GitHub <noreply@github.com>
on 6/18/2024, 9:54:55 AM