Skip to content

Commit 4691737

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

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/draw_test.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import math
2+
import os
23
import sys
34
import unittest
45
import warnings
@@ -1846,12 +1847,16 @@ def test_line_clipping_with_thickness(self):
18461847
"start={}, end={}".format(end_points[n], start_points[n]),
18471848
)
18481849

1850+
@unittest.skipIf("CI" in os.environ, "Surface is too large for CI to handle")
18491851
def test_line_draw_large_surf_regression(self):
18501852
"""Regression test for https://github.com/pygame-community/pygame-ce/issues/2961"""
1851-
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")
18521857

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

18571862

0 commit comments

Comments
 (0)