Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) #120670

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 18, 2024

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 2cf4738)

Co-authored-by: Serhiy Storchaka [email protected]

…-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.
(cherry picked from commit 2cf4738)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Jun 18, 2024
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) June 18, 2024 09:20
@serhiy-storchaka serhiy-storchaka merged commit 4b53ea8 into python:3.12 Jun 18, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants