Commits

Ronald Oussoren  committed ed23acf

Avoid test failure on OSX 10.5

  • Participants
  • Parent commits 59fdd88
  • Branches pyobjc-2.5.x

Comments (0)

Files changed (1)

File pyobjc-framework-LaunchServices/PyObjCTest/test_lsinfo.py

 
 
         default_role = LSCopyDefaultRoleHandlerForContentType("public.plain-text", kLSRolesAll)
-        self.assertIsInstance(default_role, unicode)
+        if os_release() <= '10.5':
+            if default_role is not None:
+                self.assertIsInstance(default_role, unicode)
+        else:
+            self.assertIsInstance(default_role, unicode)
 
         v = LSCopyAllRoleHandlersForContentType("public.plain-text", kLSRolesAll)
         self.assertIsInstance(v, CFArrayRef)
 
         self.assertResultIsCFRetained(LSCopyDefaultHandlerForURLScheme)
         default_handler = LSCopyDefaultHandlerForURLScheme("http")
-        self.assertIsInstance(default_handler, unicode)
+        if os_release() <= '10.5':
+            if default_handler is not None:
+                self.assertIsInstance(default_handler, unicode)
+        else:
+            self.assertIsInstance(default_handler, unicode)
 
         self.assertResultIsCFRetained(LSCopyAllHandlersForURLScheme)
         v = LSCopyAllHandlersForURLScheme("http")