[PyObjC-svn] r2579 - in branches/pyobjc-2.3.x: . pyobjc-framework-SearchKit/Lib/SearchKit pyobjc-framework-SearchKit/PyObjCTest
[email protected] Sun, 15 Aug 2010 05:57:20 -0500
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Sun Aug 15 05:57:20 2010
New Revision: 2579
Log:
Merged revisions 2578 via svnmerge from
https://svn.red-bean.com/pyobjc/trunk/pyobjc
........
r2578 | ronaldoussoren | 2010-08-15 12:53:51 +0200 (Sun, 15 Aug 2010) | 2 lines
Some small tweaks to ensure that all tests pass
........
Modified:
branches/pyobjc-2.3.x/ (props changed)
branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/Lib/SearchKit/__init__.py
branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_searchkit.py
branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_skindex.py
Modified: branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/Lib/SearchKit/__init__.py
==============================================================================
--- branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/Lib/SearchKit/__init__.py (original)
+++ branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/Lib/SearchKit/__init__.py Sun Aug 15 05:57:20 2010
@@ -82,7 +82,7 @@
indexType = objc.registerCFSignature(
"SKIndexRef", b"^{__SKIndex=}", indexID)
iterType = objc.registerCFSignature(
- "SKIndexDocumentIteratorRef", b"^{__SKIndexDocumentIterator=}", indexID)
+ "SKIndexDocumentIteratorRef", b"^{__SKIndexDocumentIterator=}", iterID)
groupType = objc.registerCFSignature(
"SKSearchGroupRef", b"^{__SKSearchGroup=}", groupID)
resultType = objc.registerCFSignature(
@@ -90,6 +90,7 @@
summaryType = objc.registerCFSignature(
"SKSummaryRef", b"^{__SKSummary=}", summaryID)
+
# For some reason SKDocumentGetTypeID doesn't return the right value
# when the framework loader calls it the first time around,
# by this time the framework is fully initialized and we get
@@ -112,6 +113,4 @@
SKDocumentRef, SKSearchRef,
) = workaround()
- print "performed workaround"
-
del workaround
Modified: branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_searchkit.py
==============================================================================
--- branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_searchkit.py (original)
+++ branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_searchkit.py Sun Aug 15 05:57:20 2010
@@ -2,18 +2,17 @@
Some simple tests to check that the framework is properly wrapped.
'''
import objc
+from PyObjCTools.TestSupport import *
import unittest
import SearchKit
-class TestSearchKit (unittest.TestCase):
+class TestSearchKit (TestCase):
def testClasses(self):
self.assert_( hasattr(SearchKit, 'SKDocumentRef') )
- self.assert_( issubclass(SearchKit.SKDocumentRef, objc.lookUpClass('NSCFType')) )
- self.assert_( SearchKit.SKDocumentRef is not objc.lookUpClass('NSCFType') )
+ self.assertIsCFType( SearchKit.SKDocumentRef )
self.assert_( hasattr(SearchKit, 'SKIndexRef') )
- self.assert_( issubclass(SearchKit.SKIndexRef, objc.lookUpClass('NSCFType')) )
- self.assert_( SearchKit.SKIndexRef is not objc.lookUpClass('NSCFType') )
+ self.assertIsCFType( SearchKit.SKIndexRef )
def testValues(self):
self.assert_( hasattr(SearchKit, 'kSKIndexInverted') )
@@ -39,5 +38,5 @@
if __name__ == "__main__":
- unittest.main()
+ main()
Modified: branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_skindex.py
==============================================================================
--- branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_skindex.py (original)
+++ branches/pyobjc-2.3.x/pyobjc-framework-SearchKit/PyObjCTest/test_skindex.py Sun Aug 15 05:57:20 2010
@@ -6,8 +6,8 @@
class TestSKIndex (TestCase):
def testTypes(self):
- self.assertIsInstance(SKIndexRef, objc.objc_class)
- self.assertIsInstance(SKIndexDocumentIteratorRef, objc.objc_class)
+ self.assertIsCFType(SKIndexRef)
+ self.assertIsCFType(SKIndexDocumentIteratorRef)
def testConstants(self):
self.assertEqual(kSKIndexUnknown, 0)
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev