diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-10-29 03:28:14 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-10-29 03:28:14 (GMT) |
commit | a95e977e41ca13ac2677c455e5270cf4018f5838 (patch) | |
tree | 8e8e411caf136db1cbad5ec2f5010930f12f3ebe /Lib/test/test_traceback.py | |
parent | 47ce965562e5a767a523b9c0ae71bf0603f5bee8 (diff) | |
download | cpython-a95e977e41ca13ac2677c455e5270cf4018f5838.zip cpython-a95e977e41ca13ac2677c455e5270cf4018f5838.tar.gz cpython-a95e977e41ca13ac2677c455e5270cf4018f5838.tar.bz2 |
decrement offset when it points to a newline (#10186 followup)
Diffstat (limited to 'Lib/test/test_traceback.py')
-rw-r--r-- | Lib/test/test_traceback.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index e4ae4ab..7567849 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -295,6 +295,10 @@ class BaseExceptionReportingTests: raise SyntaxError('', ('', 0, 5, 'hello')) msg = self.get_report(e).splitlines() self.assertEqual(msg[-2], " ^") + def e(): + exec("x = 5 | 4 |") + msg = self.get_report(e).splitlines() + self.assertEqual(msg[-2], ' ^') class PyExcReportingTests(BaseExceptionReportingTests, unittest.TestCase): |