py-sdl / py-sdl2

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

power_test: Relax assertions about known information #231

Closed smcv closed 2 years ago

smcv commented 2 years ago

If a Linux laptop has been configured to stop charging the battery at a value below 100% (to increase battery longevity by preventing over-charging), and is charged to the configured maximum, SDL reports that as SDL_POWERSTATE_UNKNOWN but still reports a percentage.


I wouldn't have noticed this, except that my laptop happens to make the assertion fail most of the time :-)

Merge Checklist

a-hurst commented 2 years ago

Nice catch, thank you!