Author: ronaldoussoren
Date: Tue Jan 20 14:33:06 2009
New Revision: 2034
Log:
Full test coverage on Leopard
Modified:
trunk/pyobjc/pyobjc-framework-DictionaryServices/Lib/ (props changed)
trunk/pyobjc/pyobjc-framework-DictionaryServices/PyObjCTest/test_dictionaryservices.py
trunk/pyobjc/pyobjc-framework-DictionaryServices/setup.py
Modified: trunk/pyobjc/pyobjc-framework-DictionaryServices/PyObjCTest/test_dictionaryservices.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-DictionaryServices/PyObjCTest/test_dictionaryservices.py (original)
+++ trunk/pyobjc/pyobjc-framework-DictionaryServices/PyObjCTest/test_dictionaryservices.py Tue Jan 20 14:33:06 2009
@@ -2,22 +2,24 @@
Some simple tests to check that the framework is properly wrapped.
'''
import objc
-import unittest
-import DictionaryServices
+from PyObjCTools.TestSupport import *
+from DictionaryServices import *
-class TestDictionaryServices (unittest.TestCase):
+class TestDictionaryServices (TestCase):
def testClasses(self):
- self.assert_( hasattr(DictionaryServices, 'DCSDictionaryRef') )
- self.assert_( issubclass(DictionaryServices.DCSDictionaryRef, objc.lookUpClass('NSCFType')) )
- self.assert_( DictionaryServices.DCSDictionaryRef is not objc.lookUpClass('NSCFType') )
-
-
+ self.failUnless( issubclass(DCSDictionaryRef, objc.lookUpClass('NSCFType')) )
+ self.failUnless( DCSDictionaryRef is not objc.lookUpClass('NSCFType') )
+
def testFunctions(self):
- self.assert_( hasattr(DictionaryServices, 'DCSGetTermRangeInString') )
- self.assert_( hasattr(DictionaryServices, 'DCSCopyTextDefinition') )
+ r = DCSGetTermRangeInString(None, u"the hello world program", 5)
+ self.failUnlessIsInstance(r, CFRange)
+ self.failUnlessEqual(r, (4, 5))
+
+ r = DCSCopyTextDefinition(None, u"the hello world program", r)
+ self.failUnlessIsInstance(r, unicode)
if __name__ == "__main__":
- unittest.main()
+ main()
Modified: trunk/pyobjc/pyobjc-framework-DictionaryServices/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-DictionaryServices/setup.py (original)
+++ trunk/pyobjc/pyobjc-framework-DictionaryServices/setup.py Tue Jan 20 14:33:06 2009
@@ -18,7 +18,7 @@
setup(
name='pyobjc-framework-DictionaryServices',
- version='2.0',
+ version='2.2b1',
description = "Wrappers for the framework DictionaryServices 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.