From 16fcf27f0f8b3df74fc3ae4ff8143d2757fe08f6 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Tue, 3 Dec 2019 14:10:31 -0500 Subject: [PATCH] Back off the max value from this strategy a bit --- src/_zkapauthorizer/tests/strategies.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/_zkapauthorizer/tests/strategies.py b/src/_zkapauthorizer/tests/strategies.py index 4402065..f4d1ce5 100644 --- a/src/_zkapauthorizer/tests/strategies.py +++ b/src/_zkapauthorizer/tests/strategies.py @@ -565,8 +565,11 @@ def posix_safe_datetimes(): # represent a timestamp with microsecond precision in a floating point # number, which we do with any POSIX timestamp-like API (eg # twisted.internet.task.Clock). So don't go far enough into the - # future. - max_value=datetime(2200, 1, 1), + # future. Furthermore, once we don't fit into an unsigned 4 byte + # integers, we can't round-trip through all the things that expect a + # time_t. Stay back from the absolute top to give tests a little + # space to advance time, too. + max_value=datetime.utcfromtimestamp(2 ** 31), ) -- GitLab