summaryrefslogtreecommitdiff
path: root/Lib/test/test_source_encoding.py
diff options
context:
space:
mode:
authorMartin v. L?wis <martin@v.loewis.de>2014-02-28 15:47:15 +0100
committerMartin v. L?wis <martin@v.loewis.de>2014-02-28 15:47:15 +0100
commita26559c015db29dc6ba88668aa73289c28dc0575 (patch)
tree57a511c33909e4071a8e4200ba1cd208445cb425 /Lib/test/test_source_encoding.py
parent4aa8c9d35308242f37282118525645c736d74a81 (diff)
parente0e695e2ba0adec2001f2da743ee5a8587255d2c (diff)
downloadcpython-a26559c015db29dc6ba88668aa73289c28dc0575.tar.gz
Merge heads
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r--Lib/test/test_source_encoding.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
index cd9d2b374c..39b623e637 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,14 @@ 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.assertEquals(err, b'')
+
def test_error_message(self):
compile(b'# -*- coding: iso-8859-15 -*-\n', 'dummy', 'exec')
compile(b'\xef\xbb\xbf\n', 'dummy', 'exec')