-
-
Notifications
You must be signed in to change notification settings - Fork 32k
test_inspect fails with --forever
argument
#107446
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
Comments
bisected to #106968 |
Interesting. If we replace def test_class_with_method_from_other_module(self):
tempdir = TESTFN + '_other_module_dir'
os.mkdir(tempdir)
with open(os.path.join(tempdir, 'inspect_actual%spy' % os.extsep),
'w', encoding='utf-8') as f:
f.write(textwrap.dedent("""
import inspect_other
class A:
def f(self):
pass
class A:
def f(self):
pass # correct one
A.f = inspect_other.A.f
"""))
with open(os.path.join(tempdir, 'inspect_other%spy' % os.extsep),
'w', encoding='utf-8') as f:
f.write(textwrap.dedent("""
class A:
def f(self):
pass
"""))
with DirsOnSysPath(tempdir):
import inspect_actual
self.assertIn("correct", inspect.getsource(inspect_actual.A))
shutil.rmtree(tempdir) |
The |
I chose to simply do |
Sure, solution with |
…when ran multiple times (#107451) Co-authored-by: Kumar Aditya <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Traceback:
Triend on current main.
Linked PRs
The text was updated successfully, but these errors were encountered: