diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-10-24 02:52:05 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-10-24 02:52:05 (GMT) |
commit | 503d6c5ae90c4427b236cff8b4f12051a8e72129 (patch) | |
tree | 3d753193202cf4dbe5bb4daa36c7072629186250 /Lib/test/test_traceback.py | |
parent | 8451c4b6e044f83efc2298a79af58c3e56d946a2 (diff) | |
download | cpython-503d6c5ae90c4427b236cff8b4f12051a8e72129.zip cpython-503d6c5ae90c4427b236cff8b4f12051a8e72129.tar.gz cpython-503d6c5ae90c4427b236cff8b4f12051a8e72129.tar.bz2 |
remove broken code accounting an offset the size of the line #10186
Diffstat (limited to 'Lib/test/test_traceback.py')
-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 11bdf58..e4ae4ab 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -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): |