pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
847 stars 140 forks source link

Try sleeping in window autoresize test #2832

Closed MyreMylar closed 5 months ago

MyreMylar commented 5 months ago

An idea to hopefully reduce number of CI failures on this test.

Example failures: https://github.com/pygame-community/pygame-ce/actions/runs/8573054619/job/23496953618?pr=2793 https://github.com/pygame-community/pygame-ce/actions/runs/8506569444/job/23297052392?pr=2766

I'm assuming that it is failing because the surface event has not yet been processed by the system at the time of checking and thus the callback has yet to be called for our window surface.

Adding a small delay after resizing the window should allow the system a chance to catch up.

If this doesn't work - we could also just try disabling it on Pypy where it seem to happen most often.