NabuCasa / pycognito

Python library for using AWS Cognito. With support for SRP.
Apache License 2.0
129 stars 39 forks source link

Fix test_check_token failure on systems with 32-bit time_t #207

Closed misuzu closed 1 year ago

misuzu commented 1 year ago

Skip tests if OverflowError is raised. This is a known limitation of Python on 32-bit platforms (https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp).

Catching OverflowError is the best option here since some 32-bit platforms (e.g. NetBSD) use 64-bit time_t, and others are working on providing a switch to the 64-bit type (e.g. glibc).