Skip to content

Commit 6e35def

Browse files
committed
nits
1 parent 980b494 commit 6e35def

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

test/test_round.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def test_round_p3109() -> None:
4646
RoundMode.TowardZero,
4747
(
4848
(p4min, p4min),
49-
(p4min / 4, 0),
50-
(p4min / 2, 0),
49+
(p4min / 4, 0.0),
50+
(p4min / 2, 0.0),
5151
(-p4min, -p4min),
5252
(-p4min / 4, 0.0),
5353
(-p4min / 2, 0.0),
@@ -80,8 +80,8 @@ def test_round_p3109() -> None:
8080
RoundMode.TowardNegative,
8181
(
8282
(p4min, p4min),
83-
(p4min / 4, 0),
84-
(p4min / 2, 0),
83+
(p4min / 4, 0.0),
84+
(p4min / 2, 0.0),
8585
(-p4min, -p4min),
8686
(-p4min / 4, -p4min),
8787
(-p4min / 2, -p4min),
@@ -97,11 +97,11 @@ def test_round_p3109() -> None:
9797
RoundMode.TiesToEven,
9898
(
9999
(p4min, p4min),
100-
(p4min / 4, 0),
101-
(p4min / 2, 0),
100+
(p4min / 4, 0.0),
101+
(p4min / 2, 0.0),
102102
(-p4min, -p4min),
103-
(-p4min / 4, 0),
104-
(-p4min / 2, 0),
103+
(-p4min / 4, 0.0),
104+
(-p4min / 2, 0.0),
105105
(64.0, 64.0),
106106
(63.0, 64.0),
107107
(62.0, 64.0),
@@ -117,10 +117,10 @@ def test_round_p3109() -> None:
117117
RoundMode.TiesToAway,
118118
(
119119
(p4min, p4min),
120-
(p4min / 4, 0),
120+
(p4min / 4, 0.0),
121121
(p4min / 2, p4min),
122122
(-p4min, -p4min),
123-
(-p4min / 4, 0),
123+
(-p4min / 4, 0.0),
124124
(-p4min / 2, -p4min),
125125
(64.0, 64.0),
126126
(63.0, 64.0),
@@ -282,9 +282,7 @@ def test_round_p3109b(mode: RoundMode, vals: list) -> None:
282282
),
283283
),
284284
),
285-
ids=lambda x: (
286-
f"{str(x[0])}-{'Sat' if x[1] else 'Inf'}" if len(x) == 2 else f"{len(x)}"
287-
),
285+
ids=lambda x: f"{str(x[0])}-{'Sat' if x[1] else 'Inf'}" if len(x) == 2 else None,
288286
)
289287
def test_round_p3109_sat(modesat: tuple[RoundMode, bool], vals: list) -> None:
290288
fi = format_info_p3109(4)

0 commit comments

Comments
 (0)