summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2014-02-28 14:43:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2014-02-28 14:43:36 (GMT)
commit78f1e4c865a08e5dc0afe105954b763e3c7b65eb (patch)
tree8666eb6c2a3ef10be06db038d933b574969cba3f /Lib
parent78c330d714a76439e5c17d0a156d25d53d4c5a68 (diff)
parent815b41b1cdb98686fc3f9cdf995b6983c12c04b3 (diff)
downloadcpython-78f1e4c865a08e5dc0afe105954b763e3c7b65eb.zip
cpython-78f1e4c865a08e5dc0afe105954b763e3c7b65eb.tar.gz
cpython-78f1e4c865a08e5dc0afe105954b763e3c7b65eb.tar.bz2
Merge with 3.3
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/coding20731.py4
-rw-r--r--Lib/test/test_source_encoding.py9
2 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/coding20731.py b/Lib/test/coding20731.py
new file mode 100644
index 0000000..b0e227a
--- /dev/null
+++ b/Lib/test/coding20731.py
@@ -0,0 +1,4 @@
+#coding:latin1
+
+
+
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
index cd9d2b3..39b623e 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')