diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-01-09 18:12:49 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-01-09 18:12:49 (GMT) |
commit | 1064a13bb05db8f6e86a3fe780f969fa2919a1d1 (patch) | |
tree | 1e5a07de2a552be4a392c1c6dc2d34386daa89b9 /Lib/test | |
parent | 50b82c765f82c45ee317380a5f5f85e23e7fef36 (diff) | |
download | cpython-1064a13bb05db8f6e86a3fe780f969fa2919a1d1.zip cpython-1064a13bb05db8f6e86a3fe780f969fa2919a1d1.tar.gz cpython-1064a13bb05db8f6e86a3fe780f969fa2919a1d1.tar.bz2 |
Do not reset the line number because we already set file position to correct
value.
(fixes error in patch for issue #18960)
Diffstat (limited to 'Lib/test')
-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 5bce2af..bca825d 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -146,6 +146,10 @@ class SyntaxTracebackCases(unittest.TestCase): text, charset, 4) do_test("#!shebang\n# coding: {0}\n".format(charset), text, charset, 5) + do_test(" \t\f\n# coding: {0}\n".format(charset), + text, charset, 5) + # Issue #18960: coding spec should has no effect + do_test("0\n# coding: GBK\n", "h\xe9 ho", 'utf-8', 5) class TracebackFormatTests(unittest.TestCase): |