From: Georg Brandl Date: Sun, 29 Oct 2006 09:32:16 +0000 (+0000) Subject: Fix the new EncodedFile test to work with big endian platforms. X-Git-Tag: v2.6a1~2491 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b4e1c2530636eab196fb98ea8f49389ff419e28;p=thirdparty%2FPython%2Fcpython.git Fix the new EncodedFile test to work with big endian platforms. --- diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 39d4206cbd16..fa52033ae643 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -914,8 +914,8 @@ class EncodedFileTest(unittest.TestCase): def test_basic(self): f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80') - ef = codecs.EncodedFile(f, 'utf-16', 'utf-8') - self.assertEquals(ef.read(), '\xff\xfe\\\xd5\n\x00\x00\xae') + ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8') + self.assertEquals(ef.read(), '\\\xd5\n\x00\x00\xae') f = StringIO.StringIO() ef = codecs.EncodedFile(f, 'utf-8', 'latin1')