Do not reset the line number because we already set file position to correct

value.

(fixes error in patch for issue #18960)
This commit is contained in:
Serhiy Storchaka 2014-01-09 20:12:49 +02:00
parent 50b82c765f
commit 1064a13bb0
2 changed files with 4 additions and 8 deletions

View file

@ -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):