Fix the new EncodedFile test to work with big endian platforms.

(backport from rev. 52527)
This commit is contained in:
Georg Brandl 2006-10-29 09:32:19 +00:00
parent 2527f7fee0
commit b8205a1188
1 changed files with 1 additions and 1 deletions

View File

@ -915,7 +915,7 @@ class EncodedFileTest(unittest.TestCase):
def test_basic(self): def test_basic(self):
f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80') f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80')
ef = codecs.EncodedFile(f, 'utf-16', 'utf-8') ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
self.assertEquals(ef.read(), '\xff\xfe\\\xd5\n\x00\x00\xae') self.assertEquals(ef.read(), '\xff\xfe\\\xd5\n\x00\x00\xae')
f = StringIO.StringIO() f = StringIO.StringIO()