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

This commit is contained in:
Georg Brandl 2006-10-29 09:32:16 +00:00
parent facd273198
commit 5b4e1c2530
1 changed files with 2 additions and 2 deletions

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