]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix the new EncodedFile test to work with big endian platforms.
authorGeorg Brandl <georg@python.org>
Sun, 29 Oct 2006 09:32:16 +0000 (09:32 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 29 Oct 2006 09:32:16 +0000 (09:32 +0000)
Lib/test/test_codecs.py

index 39d4206cbd168592822b940583d82b25222953b0..fa52033ae64391fc00553f0a9fd548220431e71e 100644 (file)
@@ -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')