1 2from PyObjCTools.TestSupport import * 3from Quartz.QuartzCore import * 4 5try: 6 unicode 7except NameError: 8 unicode = str 9 10class TestCATextLayer (TestCase): 11 12 @min_os_level('10.5') 13 def testMethods(self): 14 self.assertResultIsBOOL(CATextLayer.isWrapped) 15 self.assertArgIsBOOL(CATextLayer.setWrapped_, 0) 16 17 @min_os_level('10.5') 18 def testConstants(self): 19 self.assertIsInstance(kCATruncationNone, unicode) 20 self.assertIsInstance(kCATruncationStart, unicode) 21 self.assertIsInstance(kCATruncationEnd, unicode) 22 self.assertIsInstance(kCATruncationMiddle, unicode) 23 self.assertIsInstance(kCAAlignmentNatural, unicode) 24 self.assertIsInstance(kCAAlignmentLeft, unicode) 25 self.assertIsInstance(kCAAlignmentRight, unicode) 26 self.assertIsInstance(kCAAlignmentCenter, unicode) 27 self.assertIsInstance(kCAAlignmentJustified, unicode) 28 29 30if __name__ == "__main__": 31 main() 32