Commits

Ronald Oussoren committed 64102f4

NSCF* classes are implementation details and might be renamed

Comments (0)

Files changed (2)

pyobjc-core/PyObjCTest/test_copying.py

         self.assertIsInstance(a, NSMutableArray)
 
         b = copy.copy(a)
+	b.append('d')
         self.assertIsInstance(b, NSMutableArray)
         self.assertEqual(list(a), list(b))
 

pyobjc-core/PyObjCTest/test_number_proxy.py

 import objc
 
 OC_PythonNumber = objc.lookUpClass("OC_PythonNumber")
-NSCFNumber = objc.lookUpClass("NSCFNumber")
+try:
+    NSCFNumber = objc.lookUpClass("__NSCFNumber")
+except objc.error:
+    NSCFNumber = objc.lookUpClass("NSCFNumber")
+
 
 NSOrderedAscending = -1
 NSOrderedSame = 0
         # The booleans True and False must be proxied as the corresponding
         # NSNumber constants, otherwise lowlevel Cocoa/CoreFoundation code
         # get's upset.
-        boolClass = objc.lookUpClass('NSCFBoolean')
+        try:
+            boolClass = objc.lookUpClass('__NSCFBoolean')
+        except objc.error:
+            boolClass = objc.lookUpClass('NSCFBoolean')
+
         for v in (True, False):
             self.assertIs(OC_TestNumber.numberClass_(v), boolClass)
             self.assertIs(objc.repythonify(v), v)