bpo-12458: Fix line numbers for multiline expressions. (GH-8774)

This commit is contained in:
Serhiy Storchaka 2018-09-17 15:17:29 +03:00 committed by GitHub
parent 5e99b56d6b
commit da8d72c953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 3741 additions and 3709 deletions

View file

@ -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):