Skip to content

Commit 1dc41d6

Browse files
committed
Skip new unit test if CI is running or the machine running doesn't have the memory for it
1 parent 38baab2 commit 1dc41d6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/draw_test.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import math
22
import unittest
3-
import sys
3+
import os
44
import warnings
55

66
import pygame
@@ -1847,12 +1847,16 @@ def test_line_clipping_with_thickness(self):
18471847
"start={}, end={}".format(end_points[n], start_points[n]),
18481848
)
18491849

1850+
@unittest.skipIf("CI" in os.environ, "Surface is too large for CI to handle")
18501851
def test_line_draw_large_surf_regression(self):
18511852
"""Regression test for https://github.com/pygame-community/pygame-ce/issues/2961"""
1852-
surface = pygame.Surface((43371, 43371))
1853+
try:
1854+
surface = pygame.Surface((14457, 37200))
1855+
except pygame.error:
1856+
self.skipTest("Surface too large to run this test in this environment")
18531857

1854-
point1 = [30021, 37135]
1855-
point2 = [30022, 37136]
1858+
point1 = [400, 37135]
1859+
point2 = [401, 37136]
18561860
pygame.draw.line(surface, (255, 255, 255), point1, point2, 1)
18571861

18581862

0 commit comments

Comments
 (0)