/pyobjc-framework-Cocoa/PyObjCTest/test_nsscreen.py
Python | 28 lines | 22 code | 6 blank | 0 comment | 1 complexity | 428e97eb2e7fc17512e35039b7daf095 MD5 | raw file
Possible License(s): MIT
- from PyObjCTools.TestSupport import *
- from AppKit import *
- class TestNSScreen (TestCase):
- def testMethods(self):
- m = NSScreen.supportedWindowDepths.__metadata__()
- self.assertTrue(m['retval']['c_array_delimited_by_null'])
- @min_os_level('10.6')
- def testConstants10_6(self):
- self.assertIsInstance(NSScreenColorSpaceDidChangeNotification, unicode)
- @min_os_level('10.7')
- def testMethods10_7(self):
- self.assertResultHasType(NSScreen.convertRectToBacking_, NSRect.__typestr__)
- self.assertArgHasType(NSScreen.convertRectToBacking_, 0, NSRect.__typestr__)
- self.assertResultHasType(NSScreen.convertRectFromBacking_, NSRect.__typestr__)
- self.assertArgHasType(NSScreen.convertRectFromBacking_, 0, NSRect.__typestr__)
- self.assertResultHasType(NSScreen.backingAlignedRect_options_, NSRect.__typestr__)
- self.assertArgHasType(NSScreen.backingAlignedRect_options_, 0, NSRect.__typestr__)
- @min_os_level('10.9')
- def testMethods10_9(self):
- self.assertResultIsBOOL(NSScreen.screensHaveSeparateSpaces)
- if __name__ == "__main__":
- main()