summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-04-01 21:25:34 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-04-01 21:25:34 (GMT)
commit41e031004bd156ea579a35d8e1d74cafe8dac3e0 (patch)
tree9e788a19a81993c9eb54f85be6feb8a83040e324 /Modules/_decimal
parent8dbbae990c28c31f54d26f2e50c2155fd9e9b084 (diff)
downloadcpython-41e031004bd156ea579a35d8e1d74cafe8dac3e0.zip
cpython-41e031004bd156ea579a35d8e1d74cafe8dac3e0.tar.gz
cpython-41e031004bd156ea579a35d8e1d74cafe8dac3e0.tar.bz2
Fix Overflow exception in the bignum factorial benchmark that is due to
the recent change of the default value for context.Emax.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r--Modules/_decimal/tests/bench.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py
index 013f0f6..ea0823a 100644
--- a/Modules/_decimal/tests/bench.py
+++ b/Modules/_decimal/tests/bench.py
@@ -84,7 +84,10 @@ print("\n# =====================================================================
print("# Factorial")
print("# ======================================================================\n")
-C.getcontext().prec = C.MAX_PREC
+c = C.getcontext()
+c.prec = C.MAX_PREC
+c.Emax = C.MAX_EMAX
+c.Emin = C.MIN_EMIN
for n in [100000, 1000000]: