gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615)
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.
S
Serhiy Storchaka committed
2cf47389e26cb591342d07dad98619916d5a1b15
Parent: ac37a80
Committed by GitHub <noreply@github.com>
on 6/18/2024, 9:19:32 AM