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):
Core and Builtins
-----------------
+- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length
+ of the offending line.
+
- Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source
code directory name contains a non-ASCII character and the locale encoding is