mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Issue #15812: Merge from 3.5
This commit is contained in:
commit
01debaccdd
3 changed files with 9 additions and 1 deletions
|
|
@ -402,6 +402,11 @@ class TestRetrievingSourceCode(GetSourceBase):
|
|||
# Check filename override
|
||||
self.assertEqual(inspect.getmodule(None, modfile), mod)
|
||||
|
||||
def test_getframeinfo_get_first_line(self):
|
||||
frame_info = inspect.getframeinfo(self.fodderModule.fr, 50)
|
||||
self.assertEqual(frame_info.code_context[0], "# line 1\n")
|
||||
self.assertEqual(frame_info.code_context[1], "'A module docstring.'\n")
|
||||
|
||||
def test_getsource(self):
|
||||
self.assertSourceEqual(git.abuse, 29, 39)
|
||||
self.assertSourceEqual(mod.StupidGit, 21, 51)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue