1 2from PyObjCTools.TestSupport import * 3from AppKit import * 4 5class TestNSGradient (TestCase): 6 def testConstants(self): 7 self.assertEqual(NSGradientDrawsBeforeStartingLocation, (1 << 0)) 8 self.assertEqual(NSGradientDrawsAfterEndingLocation, (1 << 1)) 9 10 11 def testMethods(self): 12 self.assertArgSizeInArg(NSGradient.initWithColors_atLocations_colorSpace_, 1, 0) 13 self.assertArgIsIn(NSGradient.initWithColors_atLocations_colorSpace_, 1) 14 15 self.assertArgIsOut(NSGradient.getColor_location_atIndex_, 0) 16 self.assertArgIsOut(NSGradient.getColor_location_atIndex_, 1) 17 18 19if __name__ == "__main__": 20 main() 21