mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
remove broken code accounting an offset the size of the line #10186
This commit is contained in:
parent
8451c4b6e0
commit
503d6c5ae9
3 changed files with 9 additions and 2 deletions
|
@ -289,6 +289,12 @@ class BaseExceptionReportingTests:
|
|||
self.assertIn('inner_raise() # Marker', blocks[2])
|
||||
self.check_zero_div(blocks[2])
|
||||
|
||||
def test_syntax_error_offset_at_eol(self):
|
||||
# See #10186.
|
||||
def e():
|
||||
raise SyntaxError('', ('', 0, 5, 'hello'))
|
||||
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