summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-24 02:57:31 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-10-24 02:57:31 (GMT)
commit983161186594c6fd7a0a97c76018dccd24e11a63 (patch)
treeadebcda86f6c5bae81481603bb374070b17aabf4 /Lib
parentfeca46c16726ea4e4d16c5d127824ddfbaae2d47 (diff)
downloadcpython-983161186594c6fd7a0a97c76018dccd24e11a63.zip
cpython-983161186594c6fd7a0a97c76018dccd24e11a63.tar.gz
cpython-983161186594c6fd7a0a97c76018dccd24e11a63.tar.bz2
Merged revisions 85814 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line remove broken code accounting an offset the size of the line #10186 ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_traceback.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 17413db..d39322f 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):