Commits

Ronald Oussoren committed ed1aabe

Fix byteorder issue in test

Comments (0)

Files changed (1)

Lib/Foundation/test/test_globals.py

             # longs (because these methods haven't been wrapped correctly yet).
             # NSFileTypeForHFSTypeCode therefore also accepts integers.
             fourchar = struct.unpack('i', 'rtfx')[0]
-            self.assertEquals("'rtfx'",
-                    Foundation.NSFileTypeForHFSTypeCode(fourchar))
+            if sys.byteorder == 'little':
+		    self.assertEquals("'xftr'",
+			    Foundation.NSFileTypeForHFSTypeCode(fourchar))
+            else:
+		    self.assertEquals("'rtfx'",
+			    Foundation.NSFileTypeForHFSTypeCode(fourchar))
 
         def testNSHFSTypeCodeFromFileType(self):
             self.assertEquals(u"rtfx",