diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_traceback.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 17413db7f9..d39322f2d9 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -296,6 +296,12 @@ class BaseExceptionReportingTests: self.assertTrue('inner_raise() # Marker' in 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): |