File tree 1 file changed +0
-8
lines changed
1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change 1
1
import unittest
2
2
import pygame
3
3
import os
4
- import time
5
4
6
5
from pygame import Window
7
6
from pygame .version import SDL
@@ -321,23 +320,16 @@ def test_from_display_module(self):
321
320
pygame .init ()
322
321
323
322
def test_window_surface (self ):
324
- # window's surface uses an event callback that may take some time to get
325
- # processed by the system event queue - sleep for 1 second to give
326
- # the window event queue chance to catch up
327
323
win = Window (size = (640 , 480 ))
328
- time .sleep (1 )
329
324
surf = win .get_surface ()
330
325
331
326
self .assertIsInstance (surf , pygame .Surface )
332
327
333
328
# test auto resize
334
329
self .assertTupleEqual (win .size , surf .get_size ())
335
-
336
330
win .size = (100 , 100 )
337
- time .sleep (1 )
338
331
self .assertTupleEqual (win .size , surf .get_size ())
339
332
win .size = (1280 , 720 )
340
- time .sleep (1 )
341
333
self .assertTupleEqual (win .size , surf .get_size ())
342
334
343
335
# window surface should be invalid after the window is destroyed
You can’t perform that action at this time.
0 commit comments