mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Fix SF#1516184 (again) and add a test to prevent regression.
(There was a problem with empty filenames still causing recursion)
This commit is contained in:
parent
cfe3128cd5
commit
1a2959cfa8
2 changed files with 4 additions and 2 deletions
|
@ -187,6 +187,7 @@ class TestRetrievingSourceCode(GetSourceBase):
|
|||
exec "def x(): pass" in m.__dict__
|
||||
self.assertEqual(inspect.getsourcefile(m.x.func_code), '<string>')
|
||||
del sys.modules[name]
|
||||
inspect.getmodule(compile('a=10','','single'))
|
||||
|
||||
class TestDecorators(GetSourceBase):
|
||||
fodderFile = mod2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue