Skip to content

Commit 7ad5b67

Browse files
committed
update test_extreme_timedelta
1 parent f3a4344 commit 7ad5b67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/datetimetester.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,10 +1697,10 @@ def test_resolution_info(self):
16971697
def test_extreme_timedelta(self):
16981698
if 'Pure' not in self.__class__.__name__: return # BUG
16991699
big = self.theclass.max - self.theclass.min
1700-
# 3652058 days, 23 hours, 59 minutes, 59 seconds, 999999 microseconds, 999 nanoseconds
1701-
n = (big.days*24*3600 + big.seconds)*1000000 + big.microseconds
1702-
# n == 315537897599999999 ~= 2**58.13
1703-
justasbig = timedelta(0, 0, n, big.nanoseconds)
1700+
# 3652058 days, 86399 seconds, 999999 microseconds, 999 nanoseconds
1701+
n = ((big.days*24*3600 + big.seconds)*1000000 + big.microseconds) * 1000 + big.nanoseconds
1702+
# n == 315537897599999999999 ~= 2**68.1
1703+
justasbig = timedelta(0, 0, 0, n)
17041704
self.assertEqual(big, justasbig)
17051705
self.assertEqual(self.theclass.min + big, self.theclass.max)
17061706
self.assertEqual(self.theclass.max - big, self.theclass.min)

0 commit comments

Comments
 (0)