1from Foundation import * 2from PyObjCTools.TestSupport import * 3 4class TestAED (TestCase): 5 def testCreateWithBytes(self): 6 self.assertArgSizeInArg(NSAppleEventDescriptor.descriptorWithDescriptorType_bytes_length_, 1, 2) 7 self.assertArgIsIn(NSAppleEventDescriptor.descriptorWithDescriptorType_bytes_length_, 1) 8 9 self.assertArgSizeInArg(NSAppleEventDescriptor.initWithDescriptorType_bytes_length_, 1, 2) 10 self.assertArgIsIn(NSAppleEventDescriptor.initWithDescriptorType_bytes_length_, 1) 11 12 self.assertResultIsBOOL(NSAppleEventDescriptor.booleanValue) 13 14# def testInitWithAEDescNoCopy(self): 15# # The object will call AEDisposeDesc, meaning MacPython shouldn't 16# self.fail("Test for 'initWithAEDescNoCopy'") 17# 18# def testAccess(self): 19# # Ensure Python doesn't call AEDisposeDesc 20# self.fail('-aeDesc') 21 22 23if __name__ == "__main__": 24 main() 25