Skip to content

Commit 34381b2

Browse files
Apply suggestions from code review
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 6840090 commit 34381b2

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/test/test_time.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,8 @@ def test_FromSecondsObject(self):
10151015

10161016
def test_FromSecondsObject_float_overflow_message(self):
10171017
# Float path must report a PyTime_t overflow, like the integer path.
1018-
from _testcapi import PyTime_MIN, PyTime_MAX
10191018
from _testinternalcapi import _PyTime_FromSecondsObject
1020-
for value in (float(PyTime_MAX), float(PyTime_MIN)):
1019+
for value in (PyTime_MAX, PyTime_MIN):
10211020
for time_rnd, _ in ROUNDING_MODES:
10221021
with self.subTest(value=value, time_rnd=time_rnd):
10231022
with self.assertRaisesRegex(
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Fix the :exc:`OverflowError` message for out-of-range float timestamps: it
2-
now names ``PyTime_t`` instead of ``time_t``. Patch by tonghuaroot.
1+
Out-of-range float and integer timestamps now raise :exc:`OverflowError`
2+
with the same message. Patch by tonghuaroot.

0 commit comments

Comments
 (0)