Commits

Bob Ippolito committed 5388d58

move GUITests back

Comments (0)

Files changed (4)

pyobjc/Examples/AppKit/GUITests/00ReadMe.txt

-This directory contains a number of tests that require full GUI access. These
-tests should be integrated in the unittest framework.

pyobjc/Examples/AppKit/GUITests/test_modalsession.py

-"""
-Check if NSModalSessions are properly wrapped.
-
-XXX: This is not a proper unittest, it requires human eyes to check if the
-output is correct.
-"""
-import objc
-from Foundation import *
-from AppKit import *
-import time
-
-def doTest():
-    alertPanel = None
-    modalSession = None
-    app = NSApplication.sharedApplication()
-    try:
-        alertPanel = NSGetInformationalAlertPanel(
-                "Please wait", "Bla bla bla", None, None, None)
-        modalSession = app.beginModalSessionForWindow_(alertPanel)
-
-        print modalSession, modalSession.pointer
-        time.sleep(1)
-    finally:
-        if modalSession is not None:
-            app.endModalSession_(modalSession)
-            modalSession = None
-
-        if alertPanel is not None:
-            NSReleaseAlertPanel(alertPanel)
-            alertPanel = None
-
-
-
-class AppDelegate (NSObject):
-    def applicationDidFinishLaunching_(self, aNotification):
-        doTest()
-        aNotification.object().terminate_(None)
-
-def main():
-    app = NSApplication.sharedApplication()
-
-    delegate = AppDelegate.alloc().init()
-    NSApp().setDelegate_(delegate)
-
-    win = NSWindow.alloc()
-    frame = ((200.0, 300.0), (250.0, 100.0))
-    win.initWithContentRect_styleMask_backing_defer_ (frame, 15, 2, 0)
-    win.setTitle_ ('HelloWorld')
-
-    app.run()
-
-if __name__ == '__main__' :
-    main()

pyobjc/Examples/GUITests/00ReadMe.txt

+This directory contains a number of tests that require full GUI access. These
+tests should be integrated in the unittest framework.

pyobjc/Examples/GUITests/test_modalsession.py

+"""
+Check if NSModalSessions are properly wrapped.
+
+XXX: This is not a proper unittest, it requires human eyes to check if the
+output is correct.
+"""
+import objc
+from Foundation import *
+from AppKit import *
+import time
+
+def doTest():
+    alertPanel = None
+    modalSession = None
+    app = NSApplication.sharedApplication()
+    try:
+        alertPanel = NSGetInformationalAlertPanel(
+                "Please wait", "Bla bla bla", None, None, None)
+        modalSession = app.beginModalSessionForWindow_(alertPanel)
+
+        print modalSession, modalSession.pointer
+        time.sleep(1)
+    finally:
+        if modalSession is not None:
+            app.endModalSession_(modalSession)
+            modalSession = None
+
+        if alertPanel is not None:
+            NSReleaseAlertPanel(alertPanel)
+            alertPanel = None
+
+
+
+class AppDelegate (NSObject):
+    def applicationDidFinishLaunching_(self, aNotification):
+        doTest()
+        aNotification.object().terminate_(None)
+
+def main():
+    app = NSApplication.sharedApplication()
+
+    delegate = AppDelegate.alloc().init()
+    NSApp().setDelegate_(delegate)
+
+    win = NSWindow.alloc()
+    frame = ((200.0, 300.0), (250.0, 100.0))
+    win.initWithContentRect_styleMask_backing_defer_ (frame, 15, 2, 0)
+    win.setTitle_ ('HelloWorld')
+
+    app.run()
+
+if __name__ == '__main__' :
+    main()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.