mirror of
https://github.com/python/cpython.git
synced 2025-11-02 14:41:33 +00:00
gh-106922: Support multi-line error locations in traceback (attempt 2) (#112097)
This commit is contained in:
parent
5c5022b862
commit
939fc6d6ea
9 changed files with 706 additions and 124 deletions
|
|
@ -2080,6 +2080,7 @@ def test_multiline_not_highlighted(self):
|
|||
""",
|
||||
[
|
||||
' 1 < 2 and',
|
||||
' 3 > 4',
|
||||
'AssertionError',
|
||||
],
|
||||
),
|
||||
|
|
@ -2087,7 +2088,7 @@ def test_multiline_not_highlighted(self):
|
|||
for source, expected in cases:
|
||||
with self.subTest(source):
|
||||
result = self.write_source(source)
|
||||
self.assertEqual(result[-2:], expected)
|
||||
self.assertEqual(result[-len(expected):], expected)
|
||||
|
||||
|
||||
class SyntaxErrorTests(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue