How to use the pyobjc.pyobjc.pyobjc-framework-Cocoa.PyObjCTest.test_nsapplication.TestNSApplicationHelper function in pyobjc

To help you get started, we’ve selected a few pyobjc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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")
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)
github apple-open-source / macos / pyobjc / pyobjc / pyobjc-framework-Cocoa / PyObjCTest / test_nsapplication.py View on Github external
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_)

pyobjc

Python<->ObjC Interoperability Module

MIT
Latest version published 22 days ago

Package Health Score

85 / 100
Full package analysis

Popular pyobjc functions

Similar packages