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.
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.