Skip to content

Commit 88b5b6d

Browse files
committed
Issue python#18604: Skip the Tk instantiation test on OS X because it can
cause GUI tests to segfault in Cocoa Tk when run under regrtest -j (multiple threads running subprocesses).
1 parent 3d678e3 commit 88b5b6d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/test/support/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ class ProcessSerialNumber(Structure):
434434
reason = "cannot run without OS X gui process"
435435

436436
# check on every platform whether tkinter can actually do anything
437-
if not reason:
437+
# but skip the test on OS X because it can cause segfaults in Cocoa Tk
438+
# when running regrtest with the -j option (multiple threads/subprocesses)
439+
if (not reason) and (sys.platform != 'darwin'):
438440
try:
439441
from tkinter import Tk
440442
root = Tk()

0 commit comments

Comments
 (0)