mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
[Bug #954364] inspect.getframeinfo() sometimes produces incorrect traceback line #s; fix is to look at tb.tb_lineno, not tb.frame.f_lineno. Patch from Robin Becker and me.
This commit is contained in:
parent
39aef79821
commit
ba8b6bc86f
2 changed files with 5 additions and 3 deletions
|
@ -158,8 +158,8 @@ istest(inspect.istraceback, 'git.ex[2]')
|
|||
istest(inspect.isframe, 'mod.fr')
|
||||
|
||||
test(len(git.tr) == 3, 'trace() length')
|
||||
test(git.tr[0][1:] == (TESTFN, 46, 'argue',
|
||||
[' self.tr = inspect.trace()\n'], 0),
|
||||
test(git.tr[0][1:] == (TESTFN, 43, 'argue',
|
||||
[' spam(a, b, c)\n'], 0),
|
||||
'trace() row 2')
|
||||
test(git.tr[1][1:] == (TESTFN, 9, 'spam', [' eggs(b + d, c + f)\n'], 0),
|
||||
'trace() row 2')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue