Skip to content

Commit 15c9b30

Browse files
Skip if no GUI
1 parent c9b1cfc commit 15c9b30

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Lib/test/test_turtle_gui.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
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-
1510
turtle = import_helper.import_module('turtle')
1611

1712

@@ -28,7 +23,9 @@ def simulate_mouse_input(w, coords):
2823

2924
square = ((0,0),(0,20),(20,20),(20,0))
3025

31-
26+
@unittest.skipIf(
27+
os.getenv("GITHUB_ACTIONS"), "Skipping GUI test in GitHub Actions"
28+
)
3229
class ScreenBaseTestCase(unittest.TestCase):
3330
def tearDown(self):
3431
turtle.bye()

0 commit comments

Comments
 (0)