]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a test failure on non-UTF-8 locales: bad_coding2.py is encoded
authorHye-Shik Chang <hyeshik@gmail.com>
Mon, 13 Aug 2007 13:11:39 +0000 (13:11 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Mon, 13 Aug 2007 13:11:39 +0000 (13:11 +0000)
in utf-8.

Lib/test/test_coding.py

index 62cf55555b317918831304c97ef8d1617a7a75d9..4d4b3f966a07dd3300a33d109f6115f408abb651 100644 (file)
@@ -16,7 +16,7 @@ class CodingTest(unittest.TestCase):
 
         path = os.path.dirname(__file__)
         filename = os.path.join(path, module_name + '.py')
-        fp = open(filename)
+        fp = open(filename, encoding='utf-8')
         text = fp.read()
         fp.close()
         self.assertRaises(SyntaxError, compile, text, filename, 'exec')