Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Lib/test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,11 @@ def check_ratio_rounding(self, pytime_converter, expected_func,
units = int(decimal.Decimal(ps).scaleb(exp).quantize(1))
if value_filter and not value_filter(units // sec_to_unit):
continue
if (value_filter and _testinternalcapi.SIZEOF_TIME_T < 8
and not value_filter(ps // 10**12)):
# A value slightly less than the time_t minimum
# overflows even if it is rounded up to it.
continue
expected = expected_func(units)
for value in (fractions.Fraction(ps, 10**12),
decimal.Decimal(ps).scaleb(-12),
Expand Down
Loading