Commits

Ronald Oussoren committed fdb98a1

Update testsuite for OSX 10.7 and 10.8

  • Participants
  • Parent commits c9471d6

Comments (0)

Files changed (21)

pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationButtonWidget.py

         self.assertResultIsBOOL(PDFAnnotationButtonWidget.isHighlighted)
         self.assertResultIsBOOL(PDFAnnotationButtonWidget.allowsToggleToOff)
 
+    @min_os_level('10.6')
+    def testMethods10_6(self):
+        self.assertArgIsBOOL(PDFAnnotationButtonWidget.setAllowsToggleToOff_, 0)
+
 if __name__ == "__main__":
     main()

pyobjc-framework-Quartz/PyObjCTest/test_caanimation.py

         self.assertIsInstance(kCAAnimationRotateAuto, unicode)
         self.assertIsInstance(kCAAnimationRotateAutoReverse, unicode)
 
+    @min_os_level('10.7')
+    def testConstants10_5(self):
+        self.assertIsInstance(kCAAnimationCubic, unicode)
+        self.assertIsInstance(kCAAnimationCubicPaced, unicode)
 
 
 if __name__ == "__main__":

pyobjc-framework-Quartz/PyObjCTest/test_cashapelayer.py

         self.assertIsInstance(kCAFillRuleEvenOdd, unicode)
         self.assertIsInstance(kCALineJoinMiter, unicode)
         self.assertIsInstance(kCALineJoinRound, unicode)
-        self.assertIsInstance(kCALineJoinRound, unicode)
+        self.assertIsInstance(kCALineJoinBevel, unicode)
         self.assertIsInstance(kCALineCapButt, unicode)
         self.assertIsInstance(kCALineCapRound, unicode)
         self.assertIsInstance(kCALineCapSquare, unicode)

pyobjc-framework-Quartz/PyObjCTest/test_cgbitmapcontext.py

         self.assertIsInstance(img, CGImageRef)
 
 
-    def testFunctions106_(self):
+    @min_os_level('10.6')
+    def testFunctions10_6(self):
         bytes_val = array.array('B', (0 for i in range(100*80*4)))
         ctx = CGBitmapContextCreateWithData(bytes_val, 100, 80, 8, 400, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaPremultipliedLast, None, None)
         self.assertIsInstance(ctx, CGContextRef)

pyobjc-framework-Quartz/PyObjCTest/test_cgdirectdisplay.py

 
 class TestCGDirectDisplay (TestCase):
 
+    @min_os_level('10.8')
+    def testConstants10_8(self):
+        self.assertIsInstance(kCGDisplayShowDuplicateLowResolutionModes, unicode)
+
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        mainID = CGMainDisplayID()
+        mode = CGDisplayCopyDisplayMode(mainID)
+        self.assertIsInstance(mode, CGDisplayModeRef)
+
+        w = CGDisplayModeGetPixelWidth(mode)
+        self.assertIsInstance(w, (int, long))
+
+        h = CGDisplayModeGetPixelHeight(mode)
+        self.assertIsInstance(h, (int, long))
+
     def testConstants(self):
         self.assertEqual(kCGNullDirectDisplay, 0)
 

pyobjc-framework-Quartz/PyObjCTest/test_cgdisplaystream.py

+from PyObjCTest.TestSupport import *
+
+import Quartz
+
+CGDisplayStreamFrameAvailableHandler = b'v@Q@@'
+
+try:
+    long
+except NameError:
+    long = int
+
+try:
+    unicode
+except NameError:
+    unicode = str
+
+class TestCGDisplayStream (TestCase):
+    @min_os_level('10.8')
+    def testTypes10_8(self):
+        self.assertIsCFType(Quartz.CGDisplayStreamRef)
+        self.assertIsCFType(Quartz.CGDisplayStreamUpdateRef)
+
+    @min_os_level('10.8')
+    def testConstants10_8(self):
+        self.assertEqual(Quartz.kCGDisplayStreamUpdateRefreshedRects, 0)
+        self.assertEqual(Quartz.kCGDisplayStreamUpdateMovedRects, 1)
+        self.assertEqual(Quartz.kCGDisplayStreamUpdateDirtyRects, 2)
+        self.assertEqual(Quartz.kCGDisplayStreamUpdateReducedDirtyRects, 3)
+
+        self.assertEqual(Quartz.kCGDisplayStreamFrameStatusFrameComplete, 0)
+        self.assertEqual(Quartz.kCGDisplayStreamFrameStatusFrameIdle, 1)
+        self.assertEqual(Quartz.kCGDisplayStreamFrameStatusFrameBlank, 2)
+        self.assertEqual(Quartz.kCGDisplayStreamFrameStatusStopped, 3)
+
+        self.assertIsInstance(Quartz.kCGDisplayStreamSourceRect, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamPreserveAspectRatio, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamColorSpace, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamMinimumFrameTime, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamShowCursor, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamQueueDepth, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamYCbCrMatrix, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamYCbCrMatrix_ITU_R_709_2, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamYCbCrMatrix_ITU_R_601_4, unicode)
+        self.assertIsInstance(Quartz.kCGDisplayStreamYCbCrMatrix_SMPTE_240M_1995, unicode)
+
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        self.assertIsInstance(Quartz.CGDisplayStreamUpdateGetTypeID(), (int, long))
+        self.assertIsInstance(Quartz.CGDisplayStreamGetTypeID(), (int, long))
+
+        self.assertResultSizeInArg(Quartz.CGDisplayStreamUpdateGetRects, 2)
+        self.assertArgIsOut(Quartz.CGDisplayStreamUpdateGetRects, 2)
+
+        Quartz.CGDisplayStreamUpdateCreateMergedUpdate # XXX: test using actual call
+
+        self.assertArgIsOut(Quartz.CGDisplayStreamUpdateGetMovedRectsDelta, 1)
+        self.assertArgIsOut(Quartz.CGDisplayStreamUpdateGetMovedRectsDelta, 2)
+
+        Quartz.CGDisplayStreamUpdateGetDropCount # XXX
+
+        self.assertResultIsCFRetained(Quartz.CGDisplayStreamCreate)
+        self.assertArgIsBlock(Quartz.CGDisplayStreamCreate, 5, CGDisplayStreamFrameAvailableHandler)
+
+        self.assertResultIsCFRetained(Quartz.CGDisplayStreamCreateWithDispatchQueue)
+        self.assertArgIsBlock(Quartz.CGDisplayStreamCreateWithDispatchQueue, 6, CGDisplayStreamFrameAvailableHandler)
+
+        Quartz.CGDisplayStreamStart # XXX
+        Quartz.CGDisplayStreamStop # XXX
+
+        Quartz.CGDisplayStreamGetRunLoopSource # XXX
+
+
+
+
+
+
+
+
+if __name__ == "__main__":
+    unittest.main()

pyobjc-framework-Quartz/PyObjCTest/test_cgimagedestination.py

 except NameError:
     unicode = str
 
-
 try:
     long
 except NameError:
     long = int
+
 import sys, os
 
 if sys.version_info[0] != 2:
         c = CGImageDestinationCreateWithDataConsumer(cons, 'public.tiff', 1, None)
         self.assertIsInstance(c, CGImageDestinationRef)
 
+    @min_os_level('10.8')
+    def testConstants10_8(self):
+        self.assertIsInstance(kCGImageDestinationMetadata, unicode)
+        self.assertIsInstance(kCGImageDestinationMergeMetadata, unicode)
+        self.assertIsInstance(kCGImageMetadataShouldExcludeXMP, unicode)
+        self.assertIsInstance(kCGImageDestinationDateTime, unicode)
+        self.assertIsInstance(kCGImageDestinationOrientation, unicode)
+
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        CGImageDestinationAddImageAndMetadata
+        self.assertResultHasType(CGImageDestinationCopyImageSource, objc._C_BOOL)
+        self.assertArgIsOut(CGImageDestinationCopyImageSource, 3)
+
+
+
+
 if __name__ == "__main__":
     main()

pyobjc-framework-Quartz/PyObjCTest/test_cgimagemetadata.py

+from PyObjCTools.TestSupport import *
+
+import Quartz
+
+try:
+    long
+except NameError:
+    long = int
+
+try:
+    unicode
+except NameError:
+    unicode = str
+
+class TestCGImageMetadata (TestCase):
+    @min_os_level('10.8')
+    def testTypes10_8(self):
+        self.assertIsCFType(Quartz.CGImageMetadataRef)
+        self.assertIsCFType(Quartz.CGImageMetadataTagRef)
+
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        self.assertIsInstance(Quartz.CGImageMetadataGetTypeID(), (int, long))
+        self.assertIsInstance(Quartz.CGImageMetadataTagGetTypeID(), (int, long))
+
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCreateMutable)
+        m = Quartz.CGImageMetadataCreateMutable()
+        self.assertIsInstance(m, Quartz.CGImageMetadataRef)
+
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCreateMutableCopy)
+        m2 = Quartz.CGImageMetadataCreateMutableCopy(m)
+        self.assertIsInstance(m2, Quartz.CGImageMetadataRef)
+
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataTagCreate)
+        self.assertArgHasType(Quartz.CGImageMetadataTagCopyValue, 4, objc._C_ID)
+        t = Quartz.CGImageMetadataTagCreate(
+                Quartz.kCGImageMetadataNamespaceExif,
+                Quartz.kCGImageMetadataPrefixExif,
+                "name",
+                kCGImageMetadataTypeString,
+                "value")
+        self.assertIsInstance(t, CGImageMetadataTagRef)
+
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataTagCopyNamespace)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataTagCopyPrefix)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataTagCopyName)
+        self.assertResultHasType(Quartz.CGImageMetadataTagCopyValue, objc._C_ID)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataTagCopyValue)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataTagCopyQualifiers)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCopyTags)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCopyTagWithPath)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCopyStringValueWithPath)
+        self.assertResultHasType(Quartz.CGImageMetadataRegisterNamespaceForPrefix, objc._C_BOOL)
+        self.assertArgIsOut(Quartz.CGImageMetadataRegisterNamespaceForPrefix, 3)
+        self.assertResultHasType(Quartz.CGImageMetadataSetTagWithPath, objc._C_BOOL)
+        self.assertResultHasType(Quartz.CGImageMetadataSetValueWithPath, objc._C_BOOL)
+        self.assertArgHasType(Quartz.CGImageMetadataSetValueWithPath, 3, objc._C_ID)
+        self.assertResultHasType(Quartz.CGImageMetadataRemoveTagWithPath, objc._C_BOOL)
+
+        CGImageMetadataTagBlock = objc._C_BOOL + b'@@'
+        self.assertArgIsBlock(CGImageMetadataEnumerateTagsUsingBlock, 3, CGImageMetadataTagBlock)
+
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCopyTagMatchingImageProperty)
+        self.assertResultHasType(Quartz.CGImageMetadataSetValueMatchingImageProperty, objc._C_BOOL)
+        self.assertArgHasType(Quartz.CGImageMetadataSetValueMatchingImageProperty, 3, objc._C_ID)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCreateXMPData)
+        self.assertResultIsCFRetained(Quartz.CGImageMetadataCreateFromXMPData)
+
+
+    @min_os_level('10.8')
+    def testConstants10_8(self):
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceExif, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceExifAux, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceDublinCore, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceIPTCCore, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespacePhotoshop, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceTIFF, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceXMPBasic, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataNamespaceXMPRights, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixExif, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixExifAux, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixDublinCore, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixIPTCCore, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixPhotoshop, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixTIFF, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixXMPBasic, unicode)
+        self.assertIsInstance(Quartz.kCGImageMetadataPrefixXMPRights, unicode)
+
+        self.assertEqual(Quartz.kCGImageMetadataTypeInvalid, -1)
+        self.assertEqual(Quartz.kCGImageMetadataTypeDefault, 0)
+        self.assertEqual(Quartz.kCGImageMetadataTypeString, 1)
+        self.assertEqual(Quartz.kCGImageMetadataTypeArrayUnordered, 2)
+        self.assertEqual(Quartz.kCGImageMetadataTypeArrayOrdered, 3)
+        self.assertEqual(Quartz.kCGImageMetadataTypeAlternateArray, 4)
+        self.assertEqual(Quartz.kCGImageMetadataTypeAlternateText, 5)
+        self.assertEqual(Quartz.kCGImageMetadataTypeStructure, 6)
+
+        self.assertIsInstance(Quartz.kCGImageMetadataEnumerateRecursively, unicode)
+        self.assertIsInstance(Quartz.kCFErrorDomainCGImageMetadata, unicode)
+
+        self.assertEqual(Quartz.kCGImageMetadataErrorUnknown, 0)
+        self.assertEqual(Quartz.kCGImageMetadataErrorUnsupportedFormat, 1)
+        self.assertEqual(Quartz.kCGImageMetadataErrorBadArgument, 2)
+        self.assertEqual(Quartz.kCGImageMetadataErrorConflictingArguments, 3)
+        self.assertEqual(Quartz.kCGImageMetadataErrorPrefixConflict, 4)
+
+
+
+if __name__ == "__main__":
+    main()
+

pyobjc-framework-Quartz/PyObjCTest/test_cgimageproperties.py

         self.assertIsInstance(kCGImagePropertyIPTCContactInfoPhones, unicode)
         self.assertIsInstance(kCGImagePropertyIPTCContactInfoWebURLs, unicode)
 
+    @min_os_level('10.7')
+    def testConstants10_7(self):
+        self.assertIsInstance(kCGImagePropertyExifCameraOwnerName, unicode)
+        self.assertIsInstance(kCGImagePropertyExifBodySerialNumber, unicode)
+        self.assertIsInstance(kCGImagePropertyExifLensSpecification, unicode)
+        self.assertIsInstance(kCGImagePropertyExifLensMake, unicode)
+        self.assertIsInstance(kCGImagePropertyExifLensModel, unicode)
+        self.assertIsInstance(kCGImagePropertyExifLensSerialNumber, unicode)
+        self.assertIsInstance(kCGImagePropertyGIFUnclampedDelayTime, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGAuthor, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGCopyright, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGCreationTime, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGDescription, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGModificationTime, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGSoftware, unicode)
+        self.assertIsInstance(kCGImagePropertyPNGTitle, unicode)
 
 if __name__ == "__main__":
     main()

pyobjc-framework-Quartz/PyObjCTest/test_cgimagesource.py

+from PyObjCTools.TestSupport import *
+
+import Quartz
+
+try:
+    unicode
+except NameError:
+    unicode = str
+
+try:
+    long
+except NameError:
+    long = int
+
+class TestCGImageSource (TestCase):
+    def testConstants(self):
+        self.assertEqual(Quartz.kCGImageStatusUnexpectedEOF, -5)
+        self.assertEqual(Quartz.kCGImageStatusInvalidData, -4)
+        self.assertEqual(Quartz.kCGImageStatusUnknownType, -3)
+        self.assertEqual(Quartz.kCGImageStatusReadingHeader, -2)
+        self.assertEqual(Quartz.kCGImageStatusIncomplete, -1)
+        self.assertEqual(Quartz.kCGImageStatusComplete, 0)
+
+        self.assertIsInstance(Quartz.kCGImageSourceTypeIdentifierHint, unicode)
+        self.assertIsInstance(Quartz.kCGImageSourceShouldCache, unicode)
+        self.assertIsInstance(Quartz.kCGImageSourceShouldAllowFloat, unicode)
+        self.assertIsInstance(Quartz.kCGImageSourceCreateThumbnailFromImageIfAbsent, unicode)
+        self.assertIsInstance(Quartz.kCGImageSourceThumbnailMaxPixelSize, unicode)
+        self.assertIsInstance(Quartz.kCGImageSourceCreateThumbnailWithTransform, unicode)
+
+    def testTypes(self):
+        self.assertIsCFType(Quartz.CGImageSourceRef)
+
+    def testFunctions(self):
+        self.assertIsInstance(Quartz.CGImageSourceGetTypeID(), (int, long))
+
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCopyTypeIdentifiers)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCreateWithDataProvider)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCreateWithData)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCreateWithURL)
+
+        Quartz.CGImageSourceGetType
+        Quartz.CGImageSourceGetCount
+
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCopyProperties)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCopyPropertiesAtIndex)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCreateImageAtIndex)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCreateThumbnailAtIndex)
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCreateIncremental)
+        self.assertArgHasType(Quartz.CGImageSourceUpdateData, 2, objc._C_BOOL)
+        self.assertArgHasType(Quartz.CGImageSourceUpdateDataProvider, 2, objc._C_BOOL)
+
+        Quartz.CGImageSourceGetStatus
+        Quartz.CGImageSourceGetStatusAtIndex
+
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        self.assertResultIsCFRetained(Quartz.CGImageSourceCopyMetadataAtIndex)
+
+if __name__ == "__main__":
+    main()

pyobjc-framework-Quartz/PyObjCTest/test_cgpath.py

         CGPathApply(path, info, applier)
         self.failIfEqual(l[0], 0)
 
+    @min_os_level('10.6')
+    def testFunctions10_6(self):
+        path = CGPathCreateMutable()
+        self.assertIsInstance(path, CGPathRef)
 
+        transform = CGAffineTransformIdentity
+        CGPathMoveToPoint(path, transform, 10, 30)
+        CGPathAddLineToPoint(path, transform, 10, 30)
 
+        r = CGPathGetPathBoundingBox(path)
+        self.assertIsInstance(r, CGRect)
+
+    @min_os_level('10.7')
+    def testFunctions10_7(self):
+        path = CGPathCreateMutable()
+        self.assertIsInstance(path, CGPathRef)
+
+        transform = CGAffineTransformIdentity
+        CGPathMoveToPoint(path, transform, 10, 30)
+        CGPathAddLineToPoint(path, transform, 10, 30)
+
+        self.assertResultIsCFRetained(CGPathCreateCopyByTransformingPath)
+        path2 = CGPathCreateCopyByTransformingPath(path, transform)
+        self.assertIsInstance(path2, CGPathRef)
+
+        self.assertResultIsCFRetained(CGPathCreateMutableCopyByTransformingPath)
+        path3 = CGPathCreateCopyByTransformingPath(path, transform)
+        self.assertIsInstance(path3, CGPathRef)
+
+        self.assertResultIsCFRetained(CGPathCreateWithEllipseInRect)
+        path = CGPathCreateWithEllipseInRect(CGRect(CGPoint(0, 0), CGSize(10, 20)), transform)
+        self.assertIsInstance(path, CGPathRef)
+
+        self.assertResultIsCFRetained(CGPathCreateCopyByDashingPath)
+        self.assertArgSizeInArg(CGPathCreateCopyByDashingPath, 3, 4)
+        path2 = CGPathCreateCopyByDashingPath(path, transform, 2.5, [2.0, 3.0, 4.0], 3)
+        self.assertIsInstance(path2, CGPathRef)
+
+        self.assertResultIsCFRetained(CGPathCreateCopyByStrokingPath)
+        path2 = CGPathCreateCopyByStrokingPath(path, transform, 4, kCGLineCapButt, kCGLineJoinRound, 1.0)
+        self.assertIsInstance(path2, CGPathRef)
+
+        path = CGPathCreateMutable()
+        self.assertIsInstance(path, CGPathRef)
+
+        transform = CGAffineTransformIdentity
+        CGPathMoveToPoint(path, transform, 10, 30)
+        CGPathAddRelativeArc(path, transform, 80, 90, 22.5, 33.0, 5.0)
 
     def testConstants(self):
         self.assertEqual(kCGPathElementMoveToPoint, 0)

pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontext.py

     unicode = str
 
 class TestCGPDFContext (TestCase):
+
+    @min_os_level('10.7')
+    def testFunctions10_7(self):
+        consumer = CGDataConsumerCreateWithCFData(data)
+        context = CGPDFContextCreate(consumer, None, None)
+
+        metadata = b'''<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?><?xpacket end='w'?>'''
+        CGPDFContextAddDocumentMetadata(context,
+                NSMutableData.dataWithBytes_length_(metadata, len(metadata)))
+
+
     @min_os_level('10.5')
     def testFunctions10_5(self):
         # Note actual test is in the function below this one.

pyobjc-framework-Quartz/PyObjCTest/test_cgremoteoperation.py

 
         self.assertTrue(CGSetLocalEventsFilterDuringSupressionState is CGSetLocalEventsFilterDuringSuppressionState)
 
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        self.assertResultIsCFRetained(CGWindowServerCreateServerPort)
 
     @expectedFailure
     def testMissing(self):

pyobjc-framework-Quartz/PyObjCTest/test_cvimagebuffer.py

         self.assertIsInstance(kCVImageBufferChromaSubsampling_411, unicode)
         self.assertIsInstance(kCVImageBufferColorPrimariesKey, unicode)
 
+    @min_os_level('10.6')
+    def testConstants10_6(self):
+        self.assertIsInstance(kCVImageBufferICCProfileKey, unicode)
+        self.assertIsInstance(kCVImageBufferTransferFunction_SMPTE_240M_1995, unicode)
+        self.assertIsInstance(kCVImageBufferTransferFunction_UseGamma, unicode)
+        self.assertIsInstance(kCVImageBufferTransferFunction_EBU_3213, unicode)
+        self.assertIsInstance(kCVImageBufferTransferFunction_SMPTE_C, unicode)
+
+    @min_os_level('10.8')
+    def testConstants10_8(self):
+        self.assertIsInstance(kCVImageBufferColorPrimaries_P22, unicode)
+
+    @min_os_level('10.8')
+    def testFunctions10_8(self):
+        self.assertResultIsCFRetained(CVImageBufferCreateColorSpaceFromAttachments)
+
 if __name__ == "__main__":
     main()

pyobjc-framework-Quartz/PyObjCTest/test_cvpixelbufferiosurface.py

+from PyObjCTools.TestSupport import *
+
+import Quartz
+
+try:
+    unicode
+except NameError:
+    unicode = str
+
+class TestCVPixelBufferIOSurface (TestCase):
+
+    @min_os_level('10.6')
+    def testConstants10_6(self):
+        self.assertIsInstance(Quartz.kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, unicode)
+        self.assertIsInstance(Quartz.kCVPixelBufferIOSurfaceOpenGLFBOCompatibilityKey, unicode)
+        self.assertIsInstance(Quartz.kCVPixelBufferIOSurfaceCoreAnimationCompatibilityKey, unicode)
+
+    @min_os_level('10.6')
+    def testFunctions10_6(self):
+        Quartz.CVPixelBufferGetIOSurface
+
+        self.assertArgIsCFRetained(Quartz.CVPixelBufferCreateWithIOSurface, 3)
+        self.assertArgIsOut(Quartz.CVPixelBufferCreateWithIOSurface, 3)
+
+if __name__ == "__main__":
+    main()

pyobjc-framework-Quartz/PyObjCTest/test_cvpixelbufferpool.py

         self.assertIsInstance(kCVPixelBufferPoolMinimumBufferCountKey, unicode)
         self.assertIsInstance(kCVPixelBufferPoolMaximumBufferAgeKey, unicode)
 
+    @min_os_level('10.7')
+    def testContants10_7(self):
+        self.assertIsInstance(kCVPixelBufferPoolAllocationThresholdKey, unicode)
+        self.assertIsInstance(kCVPixelBufferPoolFreeBufferNotification, unicode)
+
     def testFunctions(self):
         self.assertIsInstance(CVPixelBufferPoolGetTypeID(), (int, long))
 
         self.assertEqual(rv, 0)
         self.assertIsInstance(image, CVPixelBufferRef)
 
+    @min_os_level('10.7')
+    def testFunctions10_7(self):
+        self.assertArgIsOut(CVPixelBufferPoolCreatePixelBufferWithAuxAttributes, 3)
+        self.assertArgIsCFRetained(CVPixelBufferPoolCreatePixelBufferWithAuxAttributes, 3)
 
 
 if __name__ == "__main__":

pyobjc-framework-Quartz/PyObjCTest/test_cvpixelformatdescription.py

     def testConstants10_6(self):
         self.assertIsInstance(kCVPixelFormatBlackBlock, unicode)
 
+    @min_os_level('10.7')
+    def testConstants10_7(self):
+        self.assertIsInstance(kCVPixelFormatContainsAlpha, unicode)
+
 
 
 if __name__ == "__main__":

pyobjc-framework-Quartz/PyObjCTest/test_pdfdocument.py

         self.assertResultIsBOOL(PDFDocument.writeToURL_withOptions_)
         self.assertResultIsBOOL(PDFDocument.isFinding)
 
+    @min_os_level('10.7')
+    def testMethods(self):
+        self.assertArgIsBOOL(PDFDocument.printOperationForPrintInfo_scalingMode_autoRotate_, 2)
+
     def testProtocols(self):
         self.assertIsInstance(protocols.PDFDocumentNotifications, objc.informal_protocol)
         self.assertIsInstance(protocols.PDFDocumentDelegate, objc.informal_protocol)

pyobjc-framework-Quartz/PyObjCTest/test_pdfview.py

         self.assertIsInstance(PDFViewDisplayModeChangedNotification, unicode)
         self.assertIsInstance(PDFViewDisplayBoxChangedNotification, unicode)
 
+    @min_os_level('10.7')
+    def testConstants10_7(self):
+        self.assertEqual(kPDFInterpolationQualityNone, 0)
+        self.assertEqual(kPDFInterpolationQualityLow, 1)
+        self.assertEqual(kPDFInterpolationQualityHigh, 2)
+
     def testMethods(self):
         self.assertResultIsBOOL(PDFView.canGoToFirstPage)
         self.assertResultIsBOOL(PDFView.canGoToLastPage)

pyobjc-framework-Quartz/PyObjCTest/test_qcplugin.py

         self.assertEqual(kQCPlugInTimeModeIdle, 1)
         self.assertEqual(kQCPlugInTimeModeTimeBase, 2)
 
+    @min_os_level('10.7')
+    def testConstants10_7(self):
+        self.assertIsInstance(QCPlugInAttributeCategoriesKey, unicode)
+        self.assertIsInstance(QCPlugInAttributeExamplesKey, unicode)
 
 
     def testConstants(self):

pyobjc-framework-Quartz/PyObjCTest/test_qlpreviewview.py

+from PyObjCTools.TestSupport import *
+
+import Quartz
+
+class TestQLPreviewView (TestCase):
+    @min_os_level('10.7')
+    def testConstants10_7(self):
+        self.assertEqual(Quartz.QLPreviewViewStyleNormal, 0)
+        self.assertEqual(Quartz.QLPreviewViewStyleCompact, 1)
+
+    @min_os_level('10.6')
+    def testMethods10_6(self):
+        self.assertResultIsBOOL(Quartz.QLPreviewView.shouldCloseWithWindow)
+        self.assertResultIsBOOL(Quartz.QLPreviewView.autostarts)
+
+        self.assertArgIsBOOL(Quartz.QLPreviewView.setShouldCloseWithWindow_, 0)
+        self.assertArgIsBOOL(Quartz.QLPreviewView.setAutostarts_, 0)
+
+if __name__ == "__main__":
+    main()