]> granicus.if.org Git - python/commitdiff
Issue #18604: Skip the Tk instantiation test on OS X because it can
authorNed Deily <nad@acm.org>
Sun, 4 May 2014 02:24:05 +0000 (19:24 -0700)
committerNed Deily <nad@acm.org>
Sun, 4 May 2014 02:24:05 +0000 (19:24 -0700)
cause GUI tests to segfault in Cocoa Tk when run under regrtest -j
(multiple threads running subprocesses).

Lib/test/support/__init__.py

index d26281a2fbeddac19577efe1af75cb02ecd53041..40aab96c30829bc1cc3c8b09ec440c067c935e8e 100644 (file)
@@ -434,7 +434,9 @@ def _is_gui_available():
                 reason = "cannot run without OS X gui process"
 
     # check on every platform whether tkinter can actually do anything
-    if not reason:
+    # but skip the test on OS X because it can cause segfaults in Cocoa Tk
+    # when running regrtest with the -j option (multiple threads/subprocesses)
+    if (not reason) and (sys.platform != 'darwin'):
         try:
             from tkinter import Tk
             root = Tk()