mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
decrement offset when it points to a newline (#10186 followup)
This commit is contained in:
parent
47ce965562
commit
a95e977e41
2 changed files with 7 additions and 1 deletions
|
@ -295,6 +295,10 @@ class BaseExceptionReportingTests:
|
|||
raise SyntaxError('', ('', 0, 5, 'hello'))
|
||||
msg = self.get_report(e).splitlines()
|
||||
self.assertEqual(msg[-2], " ^")
|
||||
def e():
|
||||
exec("x = 5 | 4 |")
|
||||
msg = self.get_report(e).splitlines()
|
||||
self.assertEqual(msg[-2], ' ^')
|
||||
|
||||
|
||||
class PyExcReportingTests(BaseExceptionReportingTests, unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue