remove broken code accounting an offset the size of the line #10186
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 11bdf58..e4ae4ab 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -289,6 +289,12 @@
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):