[PyObjC-svn] r2048 - in trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit: . Exceptions Lib/InterfaceBuilderKit PyObjCTest

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Tue Jan 27 12:00:15 2009
New Revision: 2048

Log:
Full API test coverage on Leopard

Added:
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/Lib/InterfaceBuilderKit/PyObjC.bridgesupport
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_ibgeometry.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_ibinspector.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_ibobjectintegration.py   (contents, props changed)
Removed:
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/Lib/InterfaceBuilderKit/PyObjCOverrides.bridgesupport
Modified:
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/Exceptions/InterfaceBuilderKit.bridgesupport
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/__init__.py
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_interfacebuilderkit.py
   trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/setup.py

Modified: trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/Exceptions/InterfaceBuilderKit.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/Exceptions/InterfaceBuilderKit.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/Exceptions/InterfaceBuilderKit.bridgesupport	Tue Jan 27 12:00:15 2009
@@ -1,5 +1,217 @@
 <?xml version='1.0'?>
 <!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
-<signatures version='0.9'>
+<signatures version='1.0'>
   <struct name='IBInset' />
+  <opaque name='IBDocumentStorage*' />
+  <class name='IBDocument'>
+    <method selector='addObject:toParent:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+    </method>
+    <method selector='childrenOfObject:'>
+      <retval type='@' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='connectAction:ofSourceObject:toDestinationObject:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+      <arg index='2' type='@' />
+    </method>
+    <method selector='connectBinding:ofSourceObject:toDestinationObject:keyPath:options:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+      <arg index='2' type='@' />
+      <arg index='3' type='@' />
+      <arg index='4' type='@' />
+    </method>
+    <method selector='connectOutlet:ofSourceObject:toDestinationObject:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+      <arg index='2' type='@' />
+    </method>
+    <method class_method='true' selector='documentForObject:'>
+      <retval type='@' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='documentImageNamed:'>
+      <retval type='@' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='metadataForKey:ofObject:'>
+      <retval type='@' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+    </method>
+    <method selector='moveObject:toParent:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+    </method>
+    <method selector='objects'>
+      <retval type='@' />
+    </method>
+    <method selector='parentOfObject:'>
+      <retval type='@' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='removeObject:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='setMetadata:forKey:ofObject:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+      <arg index='2' type='@' />
+    </method>
+    <method selector='topLevelObjects'>
+      <retval type='@' />
+    </method>
+  </class>
+  <class name='IBInspector'>
+    <method selector='document'>
+      <retval type='@' />
+    </method>
+    <method selector='inspectedObjects'>
+      <retval type='@' />
+    </method>
+    <method selector='inspectedObjectsController'>
+      <retval type='@' />
+    </method>
+    <method selector='label'>
+      <retval type='@' />
+    </method>
+    <method selector='refresh'>
+      <retval type='v' />
+    </method>
+    <method class_method='true' selector='sharedInstance'>
+      <retval type='@' />
+    </method>
+    <method class_method='true' selector='supportsMultipleObjectInspection'>
+      <retval type='B' />
+    </method>
+    <method selector='view'>
+      <retval type='@' />
+    </method>
+    <method selector='viewNibName'>
+      <retval type='@' />
+    </method>
+  </class>
+  <class name='IBPlugin'>
+    <method selector='didLoad'>
+      <retval type='v' />
+    </method>
+    <method selector='document:didAddDraggedObjects:fromDraggedLibraryView:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+      <arg index='2' type='@' />
+    </method>
+    <method selector='label'>
+      <retval type='@' />
+    </method>
+    <method selector='libraryNibNames'>
+      <retval type='@' />
+    </method>
+    <method selector='pasteboardObjectsForDraggedLibraryView:'>
+      <retval type='@' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='preferencesView'>
+      <retval type='@' />
+    </method>
+    <method selector='requiredFrameworks'>
+      <retval type='@' />
+    </method>
+    <method class_method='true' selector='sharedInstance'>
+      <retval type='@' />
+    </method>
+    <method selector='willUnload'>
+      <retval type='v' />
+    </method>
+  </class>
+  <class name='NSObject'>
+    <method selector='ibAwakeInDesignableDocument:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibDefaultChildren'>
+      <retval type='@' />
+    </method>
+    <method selector='ibDefaultImage'>
+      <retval type='@' />
+    </method>
+    <method selector='ibDefaultLabel'>
+      <retval type='@' />
+    </method>
+    <method selector='ibDidAddToDesignableDocument:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibDidRemoveFromDesignableDocument:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibIsChildInitiallySelectable:'>
+      <retval type='B' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibIsChildViewUserMovable:'>
+      <retval type='B' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibIsChildViewUserSizable:'>
+      <retval type='B' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibObjectAtLocation:inWindowController:'>
+      <retval type='@' />
+      <arg index='0' type='{_NSPoint=ff}' type64='{CGPoint=dd}' />
+      <arg index='1' type='@' />
+    </method>
+    <method selector='ibPopulateAttributeInspectorClasses:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibPopulateKeyPaths:'>
+      <retval type='v' />
+      <arg index='0' type='@' />
+    </method>
+    <method selector='ibRectForChild:inWindowController:'>
+      <retval type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}' />
+      <arg index='0' type='@' />
+      <arg index='1' type='@' />
+    </method>
+  </class>
+  <class name='NSView'>
+    <method selector='ibBaselineAtIndex:'>
+      <retval type='f' />
+      <arg index='0' type='i' />
+    </method>
+    <method selector='ibBaselineCount'>
+      <retval type='i' />
+    </method>
+    <method selector='ibDesignableContentView'>
+      <retval type='@' />
+    </method>
+    <method selector='ibLayoutInset'>
+      <retval type='{IBInsetTag=ffff}' />
+    </method>
+    <method selector='ibMaximumSize'>
+      <retval type='{_NSSize=ff}' type64='{CGSize=dd}' />
+    </method>
+    <method selector='ibMinimumSize'>
+      <retval type='{_NSSize=ff}' type64='{CGSize=dd}' />
+    </method>
+    <method selector='ibPreferredDesignSize'>
+      <retval type='{_NSSize=ff}' type64='{CGSize=dd}' />
+    </method>
+    <method selector='ibPreferredResizeDirection'>
+      <retval type='i' />
+    </method>
+  </class>
 </signatures>

Modified: trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/__init__.py	Tue Jan 27 12:00:15 2009
@@ -1 +1,9 @@
 """ Unittests """
+import os
+
+if 'DYLD_FRAMEWORK_PATH' not in os.environ or \
+    '/Developer/Library/PrivateFrameworks/' not in os.environ['DYLD_FRAMEWORK_PATH']: 
+        # Check for:
+        # DYLD_FRAMEWORK_PATH='/Developer/Library/PrivateFrameworks/'
+
+        raise ImportError("Please define DYLD_FRAMEWORK_PATH, otherwise the tests will fail")

Modified: trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_interfacebuilderkit.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_interfacebuilderkit.py	(original)
+++ trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/PyObjCTest/test_interfacebuilderkit.py	Tue Jan 27 12:00:15 2009
@@ -2,33 +2,16 @@
 Some simple tests to check that the framework is properly wrapped.
 '''
 import objc
-import unittest
+from PyObjCTools.TestSupport import *
 import InterfaceBuilderKit
 
-class TestInterfaceBuilderKit (unittest.TestCase):
+class TestInterfaceBuilderKit (TestCase):
     def testClasses(self):
         self.assert_( hasattr(InterfaceBuilderKit, 'IBDocument') )
         self.assert_( isinstance(InterfaceBuilderKit.IBDocument, objc.objc_class) )
         self.assert_( hasattr(InterfaceBuilderKit, 'IBPlugin') )
         self.assert_( isinstance(InterfaceBuilderKit.IBPlugin, objc.objc_class) )
 
-    def testValues(self):
-        self.assert_( hasattr(InterfaceBuilderKit, 'IBMaxYDirection') )
-        self.assert_( isinstance(InterfaceBuilderKit.IBMaxYDirection, (int, long)) )
-        self.assertEquals(InterfaceBuilderKit.IBMaxYDirection, 8)
-
-    def testVariables(self):
-        pass
-
-    def test_structs(self):
-        self.assert_( hasattr(InterfaceBuilderKit, 'IBInset') )
-
-        o = InterfaceBuilderKit.IBInset()
-        self.assert_( hasattr(o, 'left') )
-        self.assert_( hasattr(o, 'top') )
-        self.assert_( hasattr(o, 'right') )
-        self.assert_( hasattr(o, 'bottom') )
-
     def test_protocols(self):
 
         self.assert_( hasattr(InterfaceBuilderKit, 'protocols') )
@@ -36,5 +19,5 @@
         self.assert_( isinstance(InterfaceBuilderKit.protocols.IBObjectIntegration, objc.informal_protocol) )
 
 if __name__ == "__main__":
-    unittest.main()
+    main()
 

Modified: trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/setup.py	(original)
+++ trunk/pyobjc/pyobjc-framework-InterfaceBuilderKit/setup.py	Tue Jan 27 12:00:15 2009
@@ -5,6 +5,12 @@
 for information on how to use this framework and PyObjC's documentation
 for general tips and tricks regarding the translation between Python
 and (Objective-)C frameworks
+
+NOTE: To run the unittests for this framework use::
+
+    $ env DYLD_FRAMEWORK_PATH='/Developer/Library/PrivateFrameworks/' python setup.py test
+
+This is needed because the InterfaceBuilderKit framework won't load otherwise.
 '''
 import ez_setup
 ez_setup.use_setuptools()

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.