import AppKit
from PyObjCTools.TestSupport import TestCase


class TestNSErrors(TestCase):
    def testConstants(self):
        self.assertIsInstance(AppKit.NSTextLineTooLongException, str)
        self.assertIsInstance(AppKit.NSTextNoSelectionException, str)
        self.assertIsInstance(AppKit.NSWordTablesWriteException, str)
        self.assertIsInstance(AppKit.NSWordTablesReadException, str)
        self.assertIsInstance(AppKit.NSTextReadException, str)
        self.assertIsInstance(AppKit.NSTextWriteException, str)
        self.assertIsInstance(AppKit.NSPasteboardCommunicationException, str)
        self.assertIsInstance(AppKit.NSPrintingCommunicationException, str)
        self.assertIsInstance(AppKit.NSAbortModalException, str)
        self.assertIsInstance(AppKit.NSAbortPrintingException, str)
        self.assertIsInstance(AppKit.NSIllegalSelectorException, str)
        self.assertIsInstance(AppKit.NSAppKitVirtualMemoryException, str)
        self.assertIsInstance(AppKit.NSBadRTFDirectiveException, str)
        self.assertIsInstance(AppKit.NSBadRTFFontTableException, str)
        self.assertIsInstance(AppKit.NSBadRTFStyleSheetException, str)
        self.assertIsInstance(AppKit.NSTypedStreamVersionException, str)
        self.assertIsInstance(AppKit.NSTIFFException, str)
        self.assertIsInstance(AppKit.NSPrintPackageException, str)
        self.assertIsInstance(AppKit.NSBadRTFColorTableException, str)
        self.assertIsInstance(AppKit.NSDraggingException, str)
        self.assertIsInstance(AppKit.NSColorListIOException, str)
        self.assertIsInstance(AppKit.NSColorListNotEditableException, str)
        self.assertIsInstance(AppKit.NSBadBitmapParametersException, str)
        self.assertIsInstance(AppKit.NSWindowServerCommunicationException, str)
        self.assertIsInstance(AppKit.NSFontUnavailableException, str)
        self.assertIsInstance(AppKit.NSPPDIncludeNotFoundException, str)
        self.assertIsInstance(AppKit.NSPPDParseException, str)
        self.assertIsInstance(AppKit.NSPPDIncludeStackOverflowException, str)
        self.assertIsInstance(AppKit.NSPPDIncludeStackUnderflowException, str)
        self.assertIsInstance(AppKit.NSRTFPropertyStackOverflowException, str)
        self.assertIsInstance(AppKit.NSAppKitIgnoredException, str)
        self.assertIsInstance(AppKit.NSBadComparisonException, str)
        self.assertIsInstance(AppKit.NSImageCacheException, str)
        self.assertIsInstance(AppKit.NSNibLoadingException, str)
        self.assertIsInstance(AppKit.NSBrowserIllegalDelegateException, str)
        self.assertIsInstance(AppKit.NSAccessibilityException, str)
