diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2014-02-28 15:27:29 +0100 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2014-02-28 15:27:29 +0100 |
commit | 815b41b1cdb98686fc3f9cdf995b6983c12c04b3 (patch) | |
tree | 58c273e0da20ff65f83301041971ec3e723bd1d3 /Lib/test/test_coding.py | |
parent | 9db1ab82508cd4be4195e520da8cb8d86cd1f7e4 (diff) | |
download | cpython-git-815b41b1cdb98686fc3f9cdf995b6983c12c04b3.tar.gz |
Issue #20731: Properly position in source code files even if they
are opened in text mode. Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test/test_coding.py')
-rw-r--r-- | Lib/test/test_coding.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_coding.py b/Lib/test/test_coding.py index 989c7a85d2..760676750c 100644 --- a/Lib/test/test_coding.py +++ b/Lib/test/test_coding.py @@ -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() |