Skip to content

Commit c9b1cfc

Browse files
Exit if no GUI
1 parent cf7fc31 commit c9b1cfc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_turtle_gui.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
from test.support import import_helper
88
from test.support import os_helper
99

10+
# Prevent execution of GUI-dependent tests
11+
if os.environ.get('DISPLAY', '') == '':
12+
print("No display found. Skipping GUI tests.")
13+
exit(0)
14+
1015
turtle = import_helper.import_module('turtle')
1116

1217

0 commit comments

Comments
 (0)