8000 gh-107446: Fix test_inspect.test_class_with_method_from_other_module under --forever by gaogaotiantian · Pull Request #107451 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-107446: Fix test_inspect.test_class_with_method_from_other_module under --forever #107451

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

Merged
merged 5 commits into from
Aug 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,9 @@ def f(self):
with DirsOnSysPath(tempdir):
import inspect_actual
self.assertIn("correct", inspect.getsource(inspect_actual.A))
# Remove the module from sys.modules to force it to be reloaded.
# This is necessary when the test is run multiple times.
sys.modules.pop("inspect_actual")

@unittest.skipIf(
support.is_emscripten or support.is_wasi,
Expand Down
0