]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Catch all skip_handler cases (GH-21842)
authorStefan Krah <skrah@bytereef.org>
Wed, 12 Aug 2020 14:00:05 +0000 (16:00 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Aug 2020 14:00:05 +0000 (16:00 +0200)
Modules/_decimal/tests/deccheck.py

index ca869f4dbf5d8c7f0891eed4d57d3355661176bb..5de57d1f875a2d4a2d57f003420218f0976b0ab0 100644 (file)
@@ -185,7 +185,7 @@ def p_as_triple(dec):
     coeff = int(s) if s else 0
 
     if coeff < 0 or coeff >= 2**128:
-        raise ValueError("value out of bounds for a uint128 triple");
+        raise ValueError("value out of bounds for a uint128 triple")
 
     return (sign, coeff, exp)
 
@@ -193,7 +193,7 @@ def p_from_triple(triple):
     sign, coeff, exp = triple
 
     if coeff < 0 or coeff >= 2**128:
-        raise ValueError("value out of bounds for a uint128 triple");
+        raise ValueError("value out of bounds for a uint128 triple")
 
     digits = tuple(int(c) for c in str(coeff))
 
@@ -894,7 +894,7 @@ def verify(t, stat):
         t.presults.append(str(t.rp.real))
 
         ctriple = None
-        if t.funcname not in ['__radd__', '__rmul__']: # see skip handler
+        if str(t.rc) == str(t.rp): # see skip handler
             try:
                 ctriple = c_as_triple(t.rc)
             except ValueError: