Ronald Oussoren avatar Ronald Oussoren committed d396f80

Fix NSObject comparison issue

Comments (0)

Files changed (4)

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__),
     )
 

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

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

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.