Commits

Ronald Oussoren  committed 3d05449

Fixes some test failures

  • Participants
  • Parent commits a9f7603

Comments (0)

Files changed (3)

File pyobjc-framework-Cocoa/PyObjCTest/test_cfcharacterset.py

 
     def testCreation(self):
         set = CFCharacterSetGetPredefined(kCFCharacterSetLetter)
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         set = CFCharacterSetCreateWithCharactersInRange(None, (ord('A'), ord('Z')-ord('A')))
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         set = CFCharacterSetCreateWithCharactersInString(None, b"abcdefABCDEF0123456789".decode('latin1'))
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         bytes = b"0123" * (8192//4)
         if sys.version_info[0] == 2:
             bytes = buffer(bytes)
         set = CFCharacterSetCreateWithBitmapRepresentation(None, bytes)
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         set = CFCharacterSetCreateInvertedSet(None, set)
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         set = CFCharacterSetCreateMutable(None)
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         set = CFCharacterSetCreateCopy(None, set)
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
         set = CFCharacterSetCreateMutableCopy(None, set)
-        self.assertIsInstance(set, CFCharacterSetRef)
+        self.assertIsInstance(set, (CFCharacterSetRef, CFMutableCharacterSetRef))
 
     def testInspection(self):
         letters = CFCharacterSetGetPredefined(kCFCharacterSetLetter)

File pyobjc-framework-Cocoa/PyObjCTest/test_nsdata.py

         except (TypeError, ValueError) as r:
             if str(r).find('right operand length must match slice length') == 0:
                 pass
+            elif str(r).find('lvalue and rvalue have different structures') != -1:
+                pass
             elif 'cannot modify size of memoryview object' in str(r):
                 pass
             elif 'ndarray assignment: lvalue and rvalue have different structures' in str(r):

File pyobjc-framework-Cocoa/PyObjCTest/test_nsnumber.py

         self.assertEqual(three // two, one)
 
         if sys.version_info[0] > 2:
-            self.assertEqual(round(three / two), one)
+            self.assertEqual(round(three / two), two)
             self.assertEqual(round(one / two, 1), one_half)