py-sdl / py-sdl2

Python ctypes wrapper around SDL2
Other
304 stars 49 forks source link

Partially resolve #257: video_test #270

Closed smcv closed 1 year ago

smcv commented 1 year ago

PR Description

This brings py-sdl2 a bit closer to fully resolving #257, by reducing the number of places where it assumes SDL_GetError != '' implies that there was an error. #267, #269, etc. are targeted versions of this addressing places where a newer SDL2 release does break that assumption, whereas this PR is a preventative version addressing places where a newer SDL2 release might break that assumption but has not done so yet.

This PR only covers video_test, treating all other tests as out-of-scope. Many other test modules will eventually need a change similar to this one.

Merge Checklist

a-hurst commented 1 year ago

Thanks again, I'll try combing through the other test modules and fixing the other spots I missed!

I also like the convention of documenting the checks that aren't 100% safe for the functions that return void, I'll try to keep that up elsewhere too.