[PyObjC-svn] r2348 - trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest
[email protected] Thu, 15 Oct 2009 16:04:13 -0500
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Thu Oct 15 16:04:13 2009
New Revision: 2348
Log:
More Tiger testsuite fixes
Modified:
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationPopup.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFOutline.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFThumbnailView.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgimageproperties.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cglayer.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpattern.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontext.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_qcplugin.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfilter.py
trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfiltermanager.py
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationPopup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationPopup.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationPopup.py Thu Oct 15 16:04:13 2009
@@ -3,6 +3,7 @@
from Quartz.PDFKit import *
class TestPDFAnnotationPopup (TestCase):
+ @min_os_level('10.5')
def testMethods(self):
self.failUnlessResultIsBOOL(PDFAnnotationPopup.isOpen)
self.failUnlessArgIsBOOL(PDFAnnotationPopup.setIsOpen_, 0)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFOutline.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFOutline.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFOutline.py Thu Oct 15 16:04:13 2009
@@ -3,6 +3,7 @@
from Quartz.PDFKit import *
class TestPDFOutline (TestCase):
+ @min_os_level('10.5')
def testMethods(self):
self.failUnlessResultIsBOOL(PDFOutline.isOpen)
self.failUnlessArgIsBOOL(PDFOutline.setIsOpen_, 0)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFThumbnailView.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFThumbnailView.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFThumbnailView.py Thu Oct 15 16:04:13 2009
@@ -3,6 +3,7 @@
from Quartz.PDFKit import *
class TestPDFThumbnailView (TestCase):
+ @min_os_level('10.5')
def testMethods(self):
self.failUnlessResultIsBOOL(PDFThumbnailView.allowsDragging)
self.failUnlessArgIsBOOL(PDFThumbnailView.setAllowsDragging_, 0)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgimageproperties.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgimageproperties.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgimageproperties.py Thu Oct 15 16:04:13 2009
@@ -3,6 +3,7 @@
from Quartz import *
class TestCGImageProperties (TestCase):
+
def testConstants(self):
self.failUnlessIsInstance(kCGImagePropertyTIFFDictionary, unicode)
self.failUnlessIsInstance(kCGImagePropertyGIFDictionary, unicode)
@@ -13,10 +14,8 @@
self.failUnlessIsInstance(kCGImagePropertyGPSDictionary, unicode)
self.failUnlessIsInstance(kCGImagePropertyRawDictionary, unicode)
self.failUnlessIsInstance(kCGImagePropertyCIFFDictionary, unicode)
- self.failUnlessIsInstance(kCGImagePropertyMakerCanonDictionary, unicode)
- self.failUnlessIsInstance(kCGImagePropertyMakerNikonDictionary, unicode)
- self.failUnlessIsInstance(kCGImageProperty8BIMDictionary, unicode)
- self.failUnlessIsInstance(kCGImagePropertyDNGDictionary, unicode)
+
+
self.failUnlessIsInstance(kCGImagePropertyFileSize, unicode)
self.failUnlessIsInstance(kCGImagePropertyPixelHeight, unicode)
self.failUnlessIsInstance(kCGImagePropertyPixelWidth, unicode)
@@ -202,6 +201,22 @@
self.failUnlessIsInstance(kCGImagePropertyIPTCImageOrientation, unicode)
self.failUnlessIsInstance(kCGImagePropertyIPTCLanguageIdentifier, unicode)
self.failUnlessIsInstance(kCGImagePropertyIPTCStarRating, unicode)
+
+
+ @min_os_level('10.5')
+ @expectedFailure
+ def testConstants10_5_missing(self):
+ self.failUnlessIsInstance(kCGImagePropertyMakerMinoltaDictionary, unicode)
+ self.failUnlessIsInstance(kCGImagePropertyMakerFujiDictionary, unicode)
+ self.failUnlessIsInstance(kCGImagePropertyMakerOlympusDictionary, unicode)
+ self.failUnlessIsInstance(kCGImagePropertyMakerPentaxDictionary, unicode)
+
+ @min_os_level('10.5')
+ def testConstants10_5(self):
+ self.failUnlessIsInstance(kCGImagePropertyMakerCanonDictionary, unicode)
+ self.failUnlessIsInstance(kCGImagePropertyMakerNikonDictionary, unicode)
+ self.failUnlessIsInstance(kCGImageProperty8BIMDictionary, unicode)
+ self.failUnlessIsInstance(kCGImagePropertyDNGDictionary, unicode)
self.failUnlessIsInstance(kCGImageProperty8BIMLayerNames, unicode)
self.failUnlessIsInstance(kCGImagePropertyDNGVersion, unicode)
self.failUnlessIsInstance(kCGImagePropertyDNGBackwardVersion, unicode)
@@ -254,17 +269,6 @@
self.failUnlessIsInstance(kCGImagePropertyMakerCanonFlashExposureComp, unicode)
self.failUnlessIsInstance(kCGImagePropertyMakerCanonContinuousDrive, unicode)
self.failUnlessIsInstance(kCGImagePropertyMakerCanonLensModel, unicode)
-
-
- @min_os_level('10.5')
- @expectedFailure
- def testConstants10_5_missing(self):
- self.failUnlessIsInstance(kCGImagePropertyMakerMinoltaDictionary, unicode)
- self.failUnlessIsInstance(kCGImagePropertyMakerFujiDictionary, unicode)
- self.failUnlessIsInstance(kCGImagePropertyMakerOlympusDictionary, unicode)
- self.failUnlessIsInstance(kCGImagePropertyMakerPentaxDictionary, unicode)
- @min_os_level('10.5')
- def testConstants10_5(self):
self.failUnlessIsInstance(kCGImagePropertyExifAuxDictionary, unicode)
self.failUnlessIsInstance(kCGImagePropertyMakerCanonFirmware, unicode)
self.failUnlessIsInstance(kCGImagePropertyMakerCanonAspectRatioInfo, unicode)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cglayer.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cglayer.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cglayer.py Thu Oct 15 16:04:13 2009
@@ -1,6 +1,7 @@
from PyObjCTools.TestSupport import *
-from Quartz.CoreGraphics import *
+from Quartz import *
+import Quartz
import os
class TestCGLayer (TestCase):
@@ -20,7 +21,7 @@
def tearDown(self):
CGContextEndPage(self.context)
- CGPDFContextClose(self.context)
+ if hasattr(Quartz, 'CGPDFContextClose'): CGPDFContextClose(self.context)
self.context = None
if os.path.exists("/tmp/pyobjc.test.pdf"):
os.unlink("/tmp/pyobjc.test.pdf")
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpattern.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpattern.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpattern.py Thu Oct 15 16:04:13 2009
@@ -1,6 +1,7 @@
from PyObjCTools.TestSupport import *
-from Quartz.CoreGraphics import *
+from Quartz import *
+import Quartz
import os
class TestCGPattern (TestCase):
@@ -50,7 +51,7 @@
finally:
CGContextEndPage(context)
- CGPDFContextClose(context)
+ if hasattr(Quartz, 'CGPDFContextClose'): CGPDFContextClose(context)
if os.path.exists("/tmp/pyobjc.test.pdf"):
os.unlink("/tmp/pyobjc.test.pdf")
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontext.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontext.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontext.py Thu Oct 15 16:04:13 2009
@@ -1,9 +1,15 @@
from PyObjCTools.TestSupport import *
-from Quartz.CoreGraphics import *
+from Quartz import *
+import Quartz
from Foundation import NSMutableData
class TestCGPDFContext (TestCase):
+ @min_os_level('10.5')
+ def testFunctions10_5(self):
+ # Note actual test is in the function below this one.
+ CGPDFContextClose
+
def testFunctions(self):
data = NSMutableData.data()
self.failUnlessIsInstance(data, CFMutableDataRef)
@@ -16,7 +22,7 @@
context = CGPDFContextCreate(consumer, None, None)
self.failUnlessIsInstance(context, CGContextRef)
- CGPDFContextClose(context)
+ if hasattr(Quartz, 'CGPDFContextClose'): CGPDFContextClose(context)
self.failUnlessResultIsCFRetained(CGPDFContextCreateWithURL)
url = CFURLCreateWithFileSystemPath(None,
@@ -34,7 +40,11 @@
CGPDFContextEndPage(context)
- CGPDFContextClose(context)
+ if hasattr(Quartz, 'CGPDFContextClose'): CGPDFContextClose(context)
+
+ @min_os_level('10.5')
+ def testConstants10_5(self):
+ self.failUnlessIsInstance(kCGPDFContextSubject, unicode)
def testConstants(self):
self.failUnlessIsInstance(kCGPDFContextMediaBox, unicode)
@@ -44,7 +54,6 @@
self.failUnlessIsInstance(kCGPDFContextArtBox, unicode)
self.failUnlessIsInstance(kCGPDFContextTitle, unicode)
self.failUnlessIsInstance(kCGPDFContextAuthor, unicode)
- self.failUnlessIsInstance(kCGPDFContextSubject, unicode)
self.failUnlessIsInstance(kCGPDFContextKeywords, unicode)
self.failUnlessIsInstance(kCGPDFContextCreator, unicode)
self.failUnlessIsInstance(kCGPDFContextOwnerPassword, unicode)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_qcplugin.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_qcplugin.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_qcplugin.py Thu Oct 15 16:04:13 2009
@@ -44,6 +44,7 @@
self.failUnlessIsInstance(QCPortTypeStructure, unicode)
+ @min_os_level('10.5')
def testMethods(self):
self.failUnlessResultIsBOOL(QCPlugIn.startExecution_)
self.failUnlessResultIsBOOL(QCPlugIn.execute_atTime_withArguments_)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfilter.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfilter.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfilter.py Thu Oct 15 16:04:13 2009
@@ -3,6 +3,7 @@
from Quartz import *
class TestQuartzFilter (TestCase):
+ @min_os_level('10.5')
def testMethods(self):
self.failUnlessResultIsBOOL(QuartzFilter.applyToContext_)
Modified: trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfiltermanager.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfiltermanager.py (original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_quartzfiltermanager.py Thu Oct 15 16:04:13 2009
@@ -3,9 +3,11 @@
from Quartz import *
class TestQuartzFilterManager (TestCase):
+ @min_os_level('10.5')
def testMethods(self):
self.failUnlessResultIsBOOL(QuartzFilterManager.selectFilter_)
+ @min_os_level('10.5')
def testConstants(self):
self.failUnlessIsInstance(kQuartzFilterManagerDidAddFilterNotification, unicode)
self.failUnlessIsInstance(kQuartzFilterManagerDidRemoveFilterNotification, unicode)
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference