diff options
author | Larry Hastings <larry@hastings.org> | 2014-03-17 05:54:05 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-03-17 05:54:05 (GMT) |
commit | 3c5c56f3c068bc13daea2275b951113b43a91e85 (patch) | |
tree | 1395bfb10902b7087a4ca1551f4bdb271b55ed43 /Lib/test/test_source_encoding.py | |
parent | e41b73caca2b543422f423a2ac07c29de834f44d (diff) | |
parent | 2221f666eba4a6f46f2095a801bc3e4bdbdb97d2 (diff) | |
download | cpython-3c5c56f3c068bc13daea2275b951113b43a91e85.zip cpython-3c5c56f3c068bc13daea2275b951113b43a91e85.tar.gz cpython-3c5c56f3c068bc13daea2275b951113b43a91e85.tar.bz2 |
Merged default into 3.4 branch. 3.4 branch is now effectively 3.4.1rc1.
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r-- | Lib/test/test_source_encoding.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py index cd9d2b3..0c41e50 100644 --- a/Lib/test/test_source_encoding.py +++ b/Lib/test/test_source_encoding.py @@ -5,6 +5,7 @@ from test.support import TESTFN, unlink, unload import importlib import os import sys +import subprocess class SourceEncodingTest(unittest.TestCase): @@ -58,6 +59,15 @@ class SourceEncodingTest(unittest.TestCase): # two bytes in common with the UTF-8 BOM self.assertRaises(SyntaxError, eval, b'\xef\xbb\x20') + 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.assertEqual(sub.returncode, 0) + self.assertNotIn(b'SyntaxError', err) + def test_error_message(self): compile(b'# -*- coding: iso-8859-15 -*-\n', 'dummy', 'exec') compile(b'\xef\xbb\xbf\n', 'dummy', 'exec') |