Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.assertIsInstance(NSApplicationLoad(), bool)
self.assertResultIsBOOL(NSShowsServicesMenuItem)
self.assertIsInstance(NSShowsServicesMenuItem("foobar"), bool)
self.assertIsInstance(NSSetShowsServicesMenuItem("foobar", 1), (int, long))
self.assertArgIsBOOL(NSSetShowsServicesMenuItem, 1)
NSUpdateDynamicServices()
pboard = NSPasteboard.pasteboardWithName_("pyobjctest")
self.assertIsInstance(pboard, NSPasteboard)
self.assertIsInstance(NSPerformService("help", pboard), bool)
objc.setVerbose(1)
v = TestNSApplicationHelper.alloc().init()
NSRegisterServicesProvider("foobar", v)
NSUnregisterServicesProvider("foobar")
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)
def testDelegateMethods(self):
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openTempFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldOpenUntitledFile_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_openFileWithoutUI_)
self.assertResultIsBOOL(TestNSApplicationHelper.application_printFile_)
self.assertArgIsBOOL(TestNSApplicationHelper.application_printFiles_withSettings_showPrintPanels_, 3)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldTerminateAfterLastWindowClosed_)
self.assertResultIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_)
self.assertArgIsBOOL(TestNSApplicationHelper.applicationShouldHandleReopen_hasVisibleWindows_, 1)
self.assertResultIsBOOL(TestNSApplicationHelper.writeSelectionToPasteboard_types_)
self.assertResultIsBOOL(TestNSApplicationHelper.readSelectionFromPasteboard_)