mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-12458: Fix line numbers for multiline expressions. (GH-8774)
This commit is contained in:
parent
5e99b56d6b
commit
da8d72c953
9 changed files with 3741 additions and 3709 deletions
|
@ -995,11 +995,11 @@ class TestStack(unittest.TestCase):
|
|||
s = some_inner(3, 4)
|
||||
self.assertEqual(
|
||||
[' File "%s", line %d, in some_inner\n'
|
||||
' traceback.walk_stack(None), capture_locals=True, limit=1)\n'
|
||||
' return traceback.StackSummary.extract(\n'
|
||||
' a = 1\n'
|
||||
' b = 2\n'
|
||||
' k = 3\n'
|
||||
' v = 4\n' % (__file__, some_inner.__code__.co_firstlineno + 4)
|
||||
' v = 4\n' % (__file__, some_inner.__code__.co_firstlineno + 3)
|
||||
], s.format())
|
||||
|
||||
class TestTracebackException(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue