Merge with 3.3

This commit is contained in:
Martin v. Löwis 2014-02-28 15:43:36 +01:00
commit 78f1e4c865
5 changed files with 30 additions and 2 deletions

View file

@ -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')