diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-04-05 13:21:58 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-04-05 13:21:58 (GMT) |
commit | 0774e9b9f57197380c796d36353344cb95ed07bf (patch) | |
tree | 89d37955fb4526cf0f2a561b369788971746e93f /Modules/_decimal/tests | |
parent | e7eee01f3697835d168f82357a6a97d7ca40d99a (diff) | |
download | cpython-0774e9b9f57197380c796d36353344cb95ed07bf.zip cpython-0774e9b9f57197380c796d36353344cb95ed07bf.tar.gz cpython-0774e9b9f57197380c796d36353344cb95ed07bf.tar.bz2 |
Raise InvalidOperation if exponents of zeros are clamped during exact
conversion in the Decimal constructor. Exact here refers to the
representation and not to the value (clamping does not change the value).
Diffstat (limited to 'Modules/_decimal/tests')
-rw-r--r-- | Modules/_decimal/tests/deccheck.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py index aefbed6..c8da4d0 100644 --- a/Modules/_decimal/tests/deccheck.py +++ b/Modules/_decimal/tests/deccheck.py @@ -302,6 +302,7 @@ def RestrictedDecimal(value): dec = maxcontext.create_decimal(value) if maxcontext.flags[P.Inexact] or \ maxcontext.flags[P.Rounded] or \ + maxcontext.flags[P.Clamped] or \ maxcontext.flags[P.InvalidOperation]: return context.p._raise_error(P.InvalidOperation) if maxcontext.flags[P.FloatOperation]: |