Skip to content

Commit ca10a45

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ac55bbb commit ca10a45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_time.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ def test_naturaldelta_non_finite_floats() -> None:
145145
timedelta(seconds=value). They should be returned as strings, like float("nan").
146146
A legitimately too-large *finite* float must still raise OverflowError.
147147
"""
148-
import math
149148
# Non-finite values return the string repr
150149
assert humanize.naturaldelta(float("inf")) == "inf"
151150
assert humanize.naturaldelta(float("-inf")) == "-inf"
152151
# NaN already worked before; confirm it still does
153152
assert humanize.naturaldelta(float("nan")) == "nan"
154153
# A truly too-large finite float must still raise (documented behaviour)
155154
import pytest
155+
156156
with pytest.raises(OverflowError):
157157
humanize.naturaldelta(1e308 * 10)
158158

0 commit comments

Comments
 (0)