mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #20731: Properly position in source code files even if they
are opened in text mode. Patch by Serhiy Storchaka.
This commit is contained in:
parent
9db1ab8250
commit
815b41b1cd
5 changed files with 29 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
import unittest
|
||||
from test.support import TESTFN, unlink, unload
|
||||
import importlib, os, sys
|
||||
import importlib, os, sys, subprocess
|
||||
|
||||
class CodingTest(unittest.TestCase):
|
||||
def test_bad_coding(self):
|
||||
|
@ -58,6 +58,13 @@ class CodingTest(unittest.TestCase):
|
|||
self.assertTrue(c.exception.args[0].startswith(expected),
|
||||
msg=c.exception.args[0])
|
||||
|
||||
def test_20731(self):
|
||||
sub = subprocess.Popen([sys.executable,
|
||||
os.path.join(os.path.dirname(__file__),
|
||||
'coding20731.py')],
|
||||
stderr=subprocess.PIPE)
|
||||
err = sub.communicate()[1]
|
||||
self.assertEquals(err, b'')
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue