You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_inspect fails with --forever argument #107446
I chose to simply do sys.modules.pop("inspect_actual"). We can try to fix the temp dir, but I do like the context of tempfile.TemporaryDirectory(), I think it's cleaner than TESTFN. However, I'm not opposed to use the same dir for the module.
Activity
Eclips4 commentedon Jul 29, 2023
bisected to #106968
cc @gaogaotiantian
Eclips4 commentedon Jul 29, 2023
Interesting. If we replace
tempfile.TemporaryDirectorywith something like that, error will gone.gaogaotiantian commentedon Jul 29, 2023
The
inspect_actualmodule was loaded then the temp dir is removed under--forever, so the source file is no where to be found. I'll do a PR soon.gaogaotiantian commentedon Jul 29, 2023
I chose to simply do
sys.modules.pop("inspect_actual"). We can try to fix the temp dir, but I do like the context oftempfile.TemporaryDirectory(), I think it's cleaner thanTESTFN. However, I'm not opposed to use the same dir for the module.Eclips4 commentedon Jul 30, 2023
Sure, solution with
sys.modules.pop(...)more appropriate.gh-107446: Fix test_inspect.test_class_with_method_from_other_module …