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

Lib/test/test_support.py

index 31b311915f98bcf30a8ee91db1f87d260b29a81f..b8149527bd879441975c2e66beaa7e818f4b8eb4 100644 (file)
@@ -326,7 +326,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()