Commits

Ronald Oussoren committed f254281

Fix a number of test failures

Comments (0)

Files changed (3)

pyobjc-framework-Cocoa/PyObjCTest/test_foundation.py

         self.assert_( hasattr(Foundation, 'NSStringFromSelector') )
 
     def testProtocols(self):
-        self.assert_( hasattr(Foundation, 'protocols') )
+        self.assertFalse( hasattr(Foundation, 'protocols') )
 
-        for nm in [
-                'NSArchiverCallback',
-                'NSClassDescriptionPrimitives',
-                'NSComparisonMethods',
-                #'NSConnectionDelegateMethods',
-                'NSCopyLinkMoveHandler',
-                'NSDelayedPerforming',
-                #'NSDistantObjectRequestMethods',
-                'NSDistributedObjects',
-                'NSErrorRecoveryAttempting',
-                'NSKeyValueCoding',
-                'NSKeyValueObserverNotification',
-                'NSKeyValueObserverRegistration',
-                'NSKeyValueObserving',
-                'NSKeyValueObservingCustomization',
-                #'NSKeyedArchiverDelegate',
-                'NSKeyedArchiverObjectSubstitution',
-            ]:
-
-            self.assert_( hasattr(Foundation.protocols, nm), 'protocol %s'%(nm,))
-            self.assert_( isinstance(getattr(Foundation.protocols, nm), objc.informal_protocol) )
 
     def test_structs(self):
         self.assert_( hasattr(Foundation, 'NSPoint') )

pyobjc-framework-Cocoa/PyObjCTest/test_nsdecimalnumber.py

         o, dec = v.scanDecimal_(None)
         self.assertIsInstance(dec, NSDecimal)
         self.assertIs(o, True)
-        self.assertEqual(dec.description(), '55.23')
+        self.assertEqual(str(dec), '55.23')
 
     def testMethods(self):
         self.assertArgIsBOOL(NSDecimalNumber.initWithMantissa_exponent_isNegative_, 2)

pyobjc-framework-Cocoa/PyObjCTest/test_nslock.py

         lock = NSLock.alloc().init()
         self.assert_(lock.conformsToProtocol_(objc.protocolNamed("NSLocking")))
 
-        self.assert_(lock.conformsToProtocol_(protocols.NSLocking))
-
     def testMethods(self):
         self.assertResultIsBOOL(NSLock.tryLock)
         self.assertResultIsBOOL(NSLock.lockBeforeDate_)