Commits

Ronald Oussoren committed 7f01cef

Fix test failures for the EventKit bindings

Comments (0)

Files changed (3)

pyobjc-framework-EventKit/Lib/EventKit/_metadata.py

 # This file is generated by objective.metadata
 #
-# Last update: Mon Jul  9 09:19:37 2012
+# Last update: Wed Aug 29 11:55:13 2012
 
 import objc, sys
 
     r(b'EKCalendarItem', b'hasAttendees', {'retval': {'type': b'Z'}})
     r(b'EKCalendarItem', b'hasNotes', {'retval': {'type': b'Z'}})
     r(b'EKCalendarItem', b'hasRecurrenceRules', {'retval': {'type': b'Z'}})
-    r(b'EKCalendarItem', b'isAllDay', {'retval': {'typestr': 'Z'}})
+    r(b'EKCalendarItem', b'isAllDay', {'retval': {'type': b'Z'}})
     r(b'EKEvent', b'isAllDay', {'retval': {'type': b'Z'}})
     r(b'EKEvent', b'isDetached', {'retval': {'type': b'Z'}})
     r(b'EKEvent', b'refresh', {'retval': {'type': b'Z'}})
     r(b'EKEvent', b'setAllDay:', {'arguments': {2: {'type': b'Z'}}})
     r(b'EKEventStore', b'commit:', {'retval': {'type': b'Z'}, 'arguments': {2: {'type_modifier': b'o'}}})
-    r(b'EKEventStore', b'removeCalendar:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}}})
-    r(b'EKEventStore', b'removeEvent:span:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {4: {'type': b'Z'}}})
-    r(b'EKEventStore', b'removeReminder:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}}})
-    r(b'EKEventStore', b'saveCalendar:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}}})
-    r(b'EKEventStore', b'saveEvent:span:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {4: {'type': b'Z'}}})
-    r(b'EKEventStore', b'saveReminder:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}}})
+    r(b'EKEventStore', b'enumerateEventsMatchingPredicate:usingBlock:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}, 2: {'type': b'o^B'}}}}}})
+    r(b'EKEventStore', b'fetchRemindersMatchingPredicate:completion:', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^v'}, 1: {'type': b'@'}}}}}})
+    r(b'EKEventStore', b'removeCalendar:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}, 4: {'type_modifier': b'o'}}})
+    r(b'EKEventStore', b'removeEvent:span:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {4: {'type': b'Z'}, 5: {'type_modifier': b'o'}}})
+    r(b'EKEventStore', b'removeReminder:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}, 4: {'type_modifier': b'o'}}})
+    r(b'EKEventStore', b'saveCalendar:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}, 4: {'type_modifier': b'o'}}})
+    r(b'EKEventStore', b'saveEvent:span:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {4: {'type': b'Z'}, 5: {'type_modifier': b'o'}}})
+    r(b'EKEventStore', b'saveReminder:commit:error:', {'retval': {'type': b'Z'}, 'arguments': {3: {'type': b'Z'}, 4: {'type_modifier': b'o'}}})
     r(b'EKObject', b'hasChanges', {'retval': {'type': b'Z'}})
     r(b'EKObject', b'isNew', {'retval': {'type': b'Z'}})
     r(b'EKObject', b'refresh', {'retval': {'type': b'Z'}})

pyobjc-framework-EventKit/PyObjCTest/test_ekeventstore.py

             self.assertArgIsBOOL(EventKit.EKEventStore.removeEvent_span_commit_error_, 2)
             self.assertArgIsOut(EventKit.EKEventStore.removeEvent_span_commit_error_, 3)
 
-            self.assertResultIsBOOL(EventKit.EKEventStore.removeEvent_span_error_)
-            self.assertArgIsOut(EventKit.EKEventStore.removeEvent_span_error_, 2)
 
             self.assertResultIsBOOL(EventKit.EKEventStore.removeReminder_commit_error_)
             self.assertArgIsBOOL(EventKit.EKEventStore.removeReminder_commit_error_, 1)
             self.assertArgIsBOOL(EventKit.EKEventStore.saveEvent_span_commit_error_, 2)
             self.assertArgIsOut(EventKit.EKEventStore.saveEvent_span_commit_error_, 3)
 
-            self.assertResultIsBOOL(EventKit.EKEventStore.saveEvent_span_error_)
-            self.assertArgIsOut(EventKit.EKEventStore.saveEvent_span_error_, 2)
 
             self.assertResultIsBOOL(EventKit.EKEventStore.saveReminder_commit_error_)
             self.assertArgIsBOOL(EventKit.EKEventStore.saveReminder_commit_error_, 1)
             self.assertArgIsOut(EventKit.EKEventStore.saveReminder_commit_error_, 2)
 
+        @expectedFailure
+        @min_os_level('10.8')
+        def testDocumentButMissingMethods(self):
+            self.assertResultIsBOOL(EventKit.EKEventStore.saveEvent_span_error_)
+            self.assertArgIsOut(EventKit.EKEventStore.saveEvent_span_error_, 2)
+
+            self.assertResultIsBOOL(EventKit.EKEventStore.removeEvent_span_error_)
+            self.assertArgIsOut(EventKit.EKEventStore.removeEvent_span_error_, 2)
+
         @min_os_level('10.8')
         def testConstants10_8(self):
             self.assertEqual(EventKit.EKSpanThisEvent, 0)

pyobjc-framework-EventKit/metadata/EventKit.fwinfo

 {
  "definitions": {
   "classes": {
+   "EKCalendarItem": {
+    "methods": [
+     {
+       "args": {},
+       "retval": { "type": "Z" },
+       "class_method": false,
+       "selector": "isAllDay"
+     }
+    ]
+   },
    "EKEventStore": {
     "methods": [
      {
+       "args": {
+         "1": {
+	   "callable": {
+	      "arguments": {
+	        "0": {
+	          "typestr": "^v"
+		},
+	        "1": {
+	          "typestr": "@"
+		}
+	      },
+	      "retval": {
+	        "typestr": "v"
+	      }
+	   }
+	 }
+       },
+       "class_method": false,
+       "selector": "fetchRemindersMatchingPredicate:completion:"
+     },
+     {
+       "args": {
+         "1": {
+	   "callable": {
+	      "arguments": {
+	        "0": {
+	          "typestr": "^v"
+		},
+	        "1": {
+	          "typestr": "@"
+		},
+	        "2": {
+	          "typestr": "o^B"
+		}
+	      },
+	      "retval": {
+	        "typestr": "v"
+	      }
+	   }
+	 }
+       },
+       "class_method": false,
+       "selector": "enumerateEventsMatchingPredicate:usingBlock:"
+     },
+     {
       "args": {
-       "2": {}
+       "2": { "type_modifier": "o" }
       }, 
       "class_method": false, 
       "selector": "saveCalendar:commit:error:"
      }, 
      {
       "args": {
-       "2": {}
+       "2": { "type_modifier": "o" }
       }, 
       "class_method": false, 
       "selector": "removeCalendar:commit:error:"
      }, 
      {
       "args": {
-       "3": {}
+       "3": { "type_modifier": "o" }
       }, 
       "class_method": false, 
       "selector": "saveEvent:span:commit:error:"
      }, 
      {
       "args": {
-       "3": {}
+       "3": { "type_modifier": "o" }
       }, 
       "class_method": false, 
       "selector": "removeEvent:span:commit:error:"
      }, 
      {
       "args": {
-       "2": {}
+       "2": { "type_modifier": "o" }
       }, 
       "class_method": false, 
       "selector": "saveReminder:commit:error:"
      }, 
      {
       "args": {
-       "2": {}
+       "2": { "type_modifier": "o" }
       }, 
       "class_method": false, 
       "selector": "removeReminder:commit:error:"