[PyObjC-svn] r2032 - in trunk/pyobjc/pyobjc-framework-CoreData: . Doc Examples/DragApp Examples/OutlineEdit Exceptions Lib Lib/CoreData PyObjCTest
[email protected] Tue, 20 Jan 2009 03:03:10 -0600
Newsgroups
gmane.comp.python.pyobjc.cvs
Message-ID
<[email protected] >
Author: ronaldoussoren
Date: Tue Jan 20 03:03:10 2009
New Revision: 2032
Log:
Full test coverage on 10.5.
Added:
trunk/pyobjc/pyobjc-framework-CoreData/Doc/
trunk/pyobjc/pyobjc-framework-CoreData/Doc/api-notes-CoreData.txt
trunk/pyobjc/pyobjc-framework-CoreData/Lib/CoreData/PyObjC.bridgesupport
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_coredatadefines.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_coredataerrors.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsatomicstore.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsattributedescription.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsentitydescription.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsentitymapping.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsentitymigrationpolicy.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsfetchrequest.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsfetchrequestexpression.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsmanagedobject.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsmanagedobjectcontext.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsmanagedobjectid.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsmanagedobjectmodel.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsmigrationmanager.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nspersistentstore.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nspersistentstorecoordinator.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nspropertydescription.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_nsrelationshipdescription.py (contents, props changed)
Removed:
trunk/pyobjc/pyobjc-framework-CoreData/Lib/CoreData/PyObjCOverrides.bridgesupport
Modified:
trunk/pyobjc/pyobjc-framework-CoreData/Examples/DragApp/ (props changed)
trunk/pyobjc/pyobjc-framework-CoreData/Examples/OutlineEdit/ (props changed)
trunk/pyobjc/pyobjc-framework-CoreData/Examples/OutlineEdit/MyDocument.py
trunk/pyobjc/pyobjc-framework-CoreData/Exceptions/CoreData.bridgesupport
trunk/pyobjc/pyobjc-framework-CoreData/Lib/ (props changed)
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_coredata.py
trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_managedkvo.py
trunk/pyobjc/pyobjc-framework-CoreData/setup.py
Modified: trunk/pyobjc/pyobjc-framework-CoreData/Examples/OutlineEdit/MyDocument.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreData/Examples/OutlineEdit/MyDocument.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreData/Examples/OutlineEdit/MyDocument.py Tue Jan 20 03:03:10 2009
@@ -1,13 +1,12 @@
-from PyObjCTools import NibClassBuilder
from CoreData import *
from AppKit import *
-NibClassBuilder.extractClasses("MyDocument")
-
prioritySortDescriptions = NSArray.arrayWithObject_(
NSSortDescriptor.alloc().initWithKey_ascending_("value", True))
-class MyDocument (NibClassBuilder.AutoBaseClass):
+class MyDocument (NSPersistentDocument):
+ outlineTreeController = objc.IBOutlet()
+
def initWithType_error_(self, tp, error):
self, error = super(MyDocument, self).initWithType_error_(tp, error)
if self is None:
Modified: trunk/pyobjc/pyobjc-framework-CoreData/Exceptions/CoreData.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreData/Exceptions/CoreData.bridgesupport (original)
+++ trunk/pyobjc/pyobjc-framework-CoreData/Exceptions/CoreData.bridgesupport Tue Jan 20 03:03:10 2009
@@ -511,4 +511,106 @@
<arg index='3' null_accepted='true' type_modifier='o' />
</method>
</class>
+ <class name='NSAtomicStore'>
+ <method selector='load:'>
+ <arg index='0' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='save:'>
+ <arg index='0' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='NSEntityMigrationPolicy'>
+ <method selector='beginEntityMapping:manager:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='createDestinationInstancesForSourceInstance:entityMapping:manager:error:'>
+ <arg index='3' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='createRelationshipsForDestinationInstance:entityMapping:manager:error:'>
+ <arg index='3' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='endEntityMapping:manager:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='endInstanceCreationForEntityMapping:manager:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='endRelationshipCreationForEntityMapping:manager:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='performCustomValidationForEntityMapping:manager:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='NSManagedObject'>
+ <method selector='observationInfo'>
+ <retval comment='context' type='^v' />
+ </method>
+ <method selector='setObservationInfo:'>
+ <arg comment='context' index='0' type='^v' />
+ </method>
+ <method selector='validateForDelete:'>
+ <arg index='0' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='validateForInsert:'>
+ <arg index='0' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='validateForUpdate:'>
+ <arg index='0' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='validateValue:forKey:error:'>
+ <arg index='0' type_modifier='N' />
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='NSManagedObjectContext'>
+ <method selector='countForFetchRequest:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='executeFetchRequest:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='observeValueForKeyPath:ofObject:change:context:'>
+ <arg comment='context' index='3' type='^v' />
+ </method>
+ <method selector='obtainPermanentIDsForObjects:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='save:'>
+ <arg index='0' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='NSMigrationManager'>
+ <method selector='migrateStoreFromURL:type:options:withMappingModel:toDestinationURL:destinationType:destinationOptions:error:'>
+ <arg index='7' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='NSPersistentStore'>
+ <method class_method='true' selector='metadataForPersistentStoreWithURL:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method class_method='true' selector='setMetadata:forPersistentStoreWithURL:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='NSPersistentStoreCoordinator'>
+ <method selector='addPersistentStoreWithType:configuration:URL:options:error:'>
+ <arg index='4' null_accepted='true' type_modifier='o' />
+ </method>
+ <method class_method='true' selector='metadataForPersistentStoreOfType:URL:error:'>
+ <arg index='2' null_accepted='true' type_modifier='o' />
+ </method>
+ <method class_method='true' selector='metadataForPersistentStoreWithURL:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='migratePersistentStore:toURL:options:withType:error:'>
+ <arg index='4' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='removePersistentStore:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method class_method='true' selector='setMetadata:forPersistentStoreOfType:URL:error:'>
+ <arg index='3' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
</signatures>
Modified: trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_coredata.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_coredata.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_coredata.py Tue Jan 20 03:03:10 2009
@@ -2,10 +2,10 @@
Some simple tests to check that the framework is properly wrapped.
'''
import objc
-import unittest
+from PyObjCTools.TestSupport import *
import CoreData
-class TestCoreData (unittest.TestCase):
+class TestCoreData (TestCase):
def testClasses(self):
self.assert_( hasattr(CoreData, 'NSAtomicStore') )
self.assert_( isinstance(CoreData.NSAtomicStore, objc.objc_class) )
@@ -30,5 +30,4 @@
self.assert_( isinstance(CoreData.NSErrorMergePolicy, objc.objc_object) )
if __name__ == "__main__":
- unittest.main()
-
+ main()
Modified: trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_managedkvo.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_managedkvo.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreData/PyObjCTest/test_managedkvo.py Tue Jan 20 03:03:10 2009
@@ -1,6 +1,6 @@
#! /usr/bin/python
-import unittest
+from PyObjCTools.TestSupport import *
import objc
import Foundation
@@ -9,7 +9,7 @@
class CoreDataTestObject (CoreData.NSManagedObject):
pass
-class Test (unittest.TestCase):
+class Test (TestCase):
def setUp(self):
self.entity = CoreData.NSEntityDescription.new()
self.entity.setName_('TestEntity')
@@ -37,19 +37,19 @@
managedObject.setValue_forKey_(testValue, u'testAttribute')
self.assertEquals(testValue, managedObject.valueForKey_(u'testAttribute'))
- self.assertEquals(testValue, managedObject.testAttribute)
+ self.assertEquals(testValue, managedObject._.testAttribute)
testValue = u'BobFred'
managedObject.setValue_forKey_(testValue, u'testAttribute')
self.assertEquals(testValue, managedObject.valueForKey_(u'testAttribute'))
- self.assertEquals(testValue, managedObject.testAttribute)
+ self.assertEquals(testValue, managedObject._.testAttribute)
testValue = u'Zebras have long legs.'
managedObject.testAttribute = testValue
self.assertEquals(testValue, managedObject.valueForKey_(u'testAttribute'))
- self.assertEquals(testValue, managedObject.testAttribute)
+ self.assertEquals(testValue, managedObject._.testAttribute)
def testPythonicAttribute(self):
managedObject = CoreData.NSManagedObject.alloc().initWithEntity_insertIntoManagedObjectContext_(self.entity, self.managedObjectContext)
@@ -66,7 +66,7 @@
self.assertRaises(Foundation.NSUnknownKeyException, managedObject.valueForKey_(u'attributeWithoutModel'))
-class TestSubclass (unittest.TestCase):
+class TestSubclass (TestCase):
def setUp(self):
self.entity = CoreData.NSEntityDescription.new()
self.entity.setName_('TestObject')
@@ -123,4 +123,4 @@
if __name__ == "__main__":
- unittest.main()
+ main()
Modified: trunk/pyobjc/pyobjc-framework-CoreData/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreData/setup.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreData/setup.py Tue Jan 20 03:03:10 2009
@@ -18,7 +18,7 @@
setup(
name='pyobjc-framework-CoreData',
- version='2.0',
+ version='2.2b1',
description = "Wrappers for the framework CoreData 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