Skip to content

Commit 6e0b788

Browse files
author
Stefan Krah
authored
Catch all skip_handler cases (GH-21842)
1 parent 369a1cb commit 6e0b788

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_decimal/tests/deccheck.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ def p_as_triple(dec):
185185
coeff = int(s) if s else 0
186186

187187
if coeff < 0 or coeff >= 2**128:
188-
raise ValueError("value out of bounds for a uint128 triple");
188+
raise ValueError("value out of bounds for a uint128 triple")
189189

190190
return (sign, coeff, exp)
191191

192192
def p_from_triple(triple):
193193
sign, coeff, exp = triple
194194

195195
if coeff < 0 or coeff >= 2**128:
196-
raise ValueError("value out of bounds for a uint128 triple");
196+
raise ValueError("value out of bounds for a uint128 triple")
197197

198198
digits = tuple(int(c) for c in str(coeff))
199199

@@ -894,7 +894,7 @@ def verify(t, stat):
894894
t.presults.append(str(t.rp.real))
895895

896896
ctriple = None
897-
if t.funcname not in ['__radd__', '__rmul__']: # see skip handler
897+
if str(t.rc) == str(t.rp): # see skip handler
898898
try:
899899
ctriple = c_as_triple(t.rc)
900900
except ValueError:

0 commit comments

Comments
 (0)