[PyObjC-svn] r2036 - in trunk/pyobjc/pyobjc-framework-ScriptingBridge: . Examples Exceptions PyObjCTest

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Thu Jan 22 06:31:21 2009
New Revision: 2036

Log:
Full API test coverage on Leopard

Added:
   trunk/pyobjc/pyobjc-framework-ScriptingBridge/Examples/iTunesCurrentTrack.py   (contents, props changed)
Modified:
   trunk/pyobjc/pyobjc-framework-ScriptingBridge/Exceptions/ScriptingBridge.bridgesupport
   trunk/pyobjc/pyobjc-framework-ScriptingBridge/PyObjCTest/test_scriptingbridge.py
   trunk/pyobjc/pyobjc-framework-ScriptingBridge/setup.py

Modified: trunk/pyobjc/pyobjc-framework-ScriptingBridge/Exceptions/ScriptingBridge.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-ScriptingBridge/Exceptions/ScriptingBridge.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-ScriptingBridge/Exceptions/ScriptingBridge.bridgesupport	Thu Jan 22 06:31:21 2009
@@ -65,4 +65,20 @@
   <class name='SBObject'>
     <method comment='fixme' selector='sendEvent:id:parameters:' variadic='true' />
   </class>
+  <class name='NSObject'>
+    <method selector='eventDidFail:withError:'>
+      <arg index='0' type='r^{AEDesc=I^^{OpaqueAEDataStorageType}}' />
+    </method>
+  </class>
+  <class name='SBElementArray'>
+    <method selector='arrayByApplyingSelector:'>
+      <arg index='0' sel_of_type='@@:' />
+    </method>
+    <method selector='arrayByApplyingSelector:withObject:'>
+      <arg index='0' sel_of_type='@@:@' />
+    </method>
+  </class>
+  <class name='SBObject'>
+    <method comment='fixme' selector='sendEvent:id:parameters:' variadic='true' />
+  </class>
 </signatures>

Modified: trunk/pyobjc/pyobjc-framework-ScriptingBridge/PyObjCTest/test_scriptingbridge.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-ScriptingBridge/PyObjCTest/test_scriptingbridge.py	(original)
+++ trunk/pyobjc/pyobjc-framework-ScriptingBridge/PyObjCTest/test_scriptingbridge.py	Thu Jan 22 06:31:21 2009
@@ -1,22 +1,14 @@
-'''
-Some simple tests to check that the framework is properly wrapped.
-'''
-import objc
-import unittest
-import ScriptingBridge
 
-class TestScriptingBridge (unittest.TestCase):
-    def testClasses(self):
-        self.assert_( hasattr(ScriptingBridge, 'SBApplication') )
-        self.assert_( isinstance(ScriptingBridge.SBApplication, objc.objc_class) )
-    def testProtocols(self):
-        self.assert_( hasattr(ScriptingBridge, 'protocols') )
+from PyObjCTools.TestSupport import *
+from ScriptingBridge import *
 
-        self.assert_( hasattr(ScriptingBridge.protocols, 'SBApplicationDelegate') )
-        self.assert_( isinstance(ScriptingBridge.protocols.SBApplicationDelegate, objc.informal_protocol) )
+class TestSBApplication (TestCase):
+    def testMethods(self):
+        self.failUnlessResultIsBOOL(SBApplication.isRunning)
 
+    def testProtocols(self):
+        self.failUnlessIsInstance(protocols.SBApplicationDelegate, objc.informal_protocol)
 
 
 if __name__ == "__main__":
-    unittest.main()
-
+    main()

Modified: trunk/pyobjc/pyobjc-framework-ScriptingBridge/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-ScriptingBridge/setup.py	(original)
+++ trunk/pyobjc/pyobjc-framework-ScriptingBridge/setup.py	Thu Jan 22 06:31:21 2009
@@ -18,7 +18,7 @@
 
 setup(
     name='pyobjc-framework-ScriptingBridge',
-    version='2.0',
+    version='2.2b1',
     description = "Wrappers for the framework ScriptingBridge on Mac OS X",
     long_description = __doc__,
     author='Ronald Oussoren',

------------------------------------------------------------------------------
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.