Commits

Ronald Oussoren  committed d396f80

Fix NSObject comparison issue

  • Participants
  • Parent commits c7918c0

Comments (0)

Files changed (4)

File pyobjc-core/Lib/objc/_convenience.py

             func = self.compare_
 
         except AttributeError:
+            return NotImplemented
             if self < other:
                 return -1
             elif self > other:
         else:
             return func(other)
 
-    CLASS_OBJECTS["NSObject"] += (
+    CLASS_METHODS["NSObject"] += (
         ("__cmp__", nsobject__cmp__),
     )
 

File pyobjc-core/PyObjCTest/test_archive_python.py

         @onlyIf(0, "python unittest not relevant for archiving")
         def test_empty_bytestring(self): pass
 
+        @onlyIf(0, "python unittest not relevant for archiving")
+        def test_pop_empty_stack(self): pass
+
 
         def test_long(self):
             # The real test_long method takes way to much time, test a subset

File pyobjc-framework-Accounts/PyObjCTest/test_acaccountstore.py

 import sys
 
+try:
+    unicode
+except NameError:
+    unicode = str
+
 if sys.maxsize > 2 ** 32:
     from PyObjCTools.TestSupport import *
     import Accounts

File pyobjc-framework-Accounts/PyObjCTest/test_acaccounttype.py

 import sys
 
+try:
+    unicode
+except NameError:
+    unicode = str
+
 if sys.maxsize > 2**32:
     from PyObjCTools.TestSupport import *
     import Accounts