1. Ronald Oussoren
  2. pyobjc

Commits

Bill Bumgarner  committed 27d4708

Split the Foundation tests appropriately.

  • Participants
  • Parent commits 2452de8
  • Branches default

Comments (0)

Files changed (3)

File pyobjc/Lib/Foundation/test/test_nsobject.py

View file
+import unittest
+import objc
+
+from Foundation import *
+
+class TestNSObjectInteraction( unittest.TestCase ):
+    def testNSObjectClass( self ):
+        self.assert_( NSObject.instancesRespondToSelector_( "description" ), "NSObject class claims it doesn't respond to a selector that it does." )
+        # self.assert_( NSObject.description(), "NSObject class failed to respond to +description selector." )
+
+    def testNSObjectInstance( self ):
+        instance = NSObject.new()
+
+        self.assert_( instance, "Failed to instantiate an instance" )
+        self.assert_( instance.description(), "NSObject instance didn't respond to -description selector." )
+        self.assert_( not instance.isProxy(), "Instance of NSObject claimed it was a proxy.   That seems odd." )
+        self.assert_( isinstance( instance, objc.runtime.NSObject ), "Instantiated object not an instance of NSObject." )
+        self.assert_( instance == instance, "Python identity check failed." )
+        self.assert_( instance.isEqual_( instance ), "Obj-C identity check failed." )
+        
+def suite():
+    suite = unittest.TestSuite()
+    suite.addTest( unittest.makeSuite( TestNSObjectInteraction ) )
+    return suite
+
+if __name__ == '__main__':
+    unittest.main( )
+

File pyobjc/Lib/Foundation/test/test_subclassing.py

View file
         self.assert_( subclassInstance is subclassInstance, "Identity check failed." )
         self.assert_( subclassInstance is subclassInstance.self(), "Identity check failed." )
     
-
-class TestNSObjectInteraction( unittest.TestCase ):
-    def testNSObjectClass( self ):
-        self.assert_( NSObject.instancesRespondToSelector_( "description" ), "NSObject class claims it doesn't respond to a selector that it does." )
-        # self.assert_( NSObject.description(), "NSObject class failed to respond to +description selector." )
-
-    def testNSObjectInstance( self ):
-        instance = NSObject.new()
-
-        self.assert_( instance, "Failed to instantiate an instance" )
-        self.assert_( instance.description(), "NSObject instance didn't respond to -description selector." )
-        self.assert_( not instance.isProxy(), "Instance of NSObject claimed it was a proxy.   That seems odd." )
-        self.assert_( isinstance( instance, objc.runtime.NSObject ), "Instantiated object not an instance of NSObject." )
-        self.assert_( instance == instance, "Python identity check failed." )
-        self.assert_( instance.isEqual_( instance ), "Obj-C identity check failed." )
-        
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest( unittest.makeSuite( TestNSObjectInteraction ) )
     suite.addTest( unittest.makeSuite( TestSubclassing ) )
     return suite
 

File pyobjc/MANIFEST

View file
 ./Lib/AppKit/AppKit.byref
 ./Lib/Foundation/__init__.py
 ./Lib/Foundation/Foundation.byref
+./Lib/Foundation/test/test_subclassing.py
 ./Lib/objc/__init__.py
 ./Lib/objc/_convenience.py
 ./Lib/objc/_FoundationSignatures.py