Skip to content

Commit bb7a634

Browse files
committed
Skip flaky window tests on pypy
1 parent 666f92f commit bb7a634

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/window_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import unittest
22
import pygame
33
import os
4+
import platform
45

56
from pygame import Window
67
from pygame.version import SDL
78

89
pygame.init()
910

1011

12+
IS_PYPY = "PyPy" == platform.python_implementation()
13+
14+
1115
class WindowTypeTest(unittest.TestCase):
1216
DEFAULT_TITLE = "pygame window"
1317

@@ -342,6 +346,7 @@ def test_window_surface(self):
342346
win.destroy()
343347
self.assertRaises(pygame.error, lambda: surf.fill((0, 0, 0)))
344348

349+
@unittest.skipIf(IS_PYPY, "for some reason this test is flaky on pypy")
345350
def test_window_surface_with_display_module(self):
346351
# get_surface() should raise an error if the set_mode() is not called.
347352
pygame.display.set_mode((640, 480))
@@ -397,6 +402,7 @@ def test_window_opengl(self):
397402
pygame.display.quit()
398403
pygame.init()
399404

405+
@unittest.skipIf(IS_PYPY, "for some reason this test is flaky on pypy")
400406
def test_window_subclassable(self):
401407
class WindowSubclass(Window):
402408
def __init__(self, title="Different title", size=(640, 480), **flags):

0 commit comments

Comments
 (0)