1from PyObjCTools.TestSupport import *
2import AppKit
3import objc
4
5try:
6    unicode
7except NameError:
8    unicode = str
9
10class ContantTest (TestCase):
11
12    def testNSFloatingWindowLevel(self):
13        # NSFloatingWindowLevel is a define in Objective-C, up-to 1.0rc1
14        # we didn't correctly pick up this define due to a bug in the code.
15        self.assert_(hasattr(AppKit, 'NSFloatingWindowLevel'))
16        self.assert_(isinstance(AppKit.NSFloatingWindowLevel, int))
17
18    def testNSAnyEventMask(self):
19        self.assertEqual(AppKit.NSAnyEventMask, AppKit.NSUIntegerMax)
20
21    def testNSViewFrameDidChangeNotification(self):
22        self.assert_(hasattr(AppKit, 'NSViewFrameDidChangeNotification'))
23        self.assert_(isinstance(AppKit.NSViewFrameDidChangeNotification, unicode))
24
25    def testNSUpArrowFunctionKey(self):
26        self.assert_(hasattr(AppKit, 'NSUpArrowFunctionKey'))
27        self.assertIsInstance(AppKit.NSUpArrowFunctionKey, unicode)
28
29if __name__ == "__main__":
30    main()
31