diff options
| author | Stefan Krah <skrah@bytereef.org> | 2012-04-01 23:25:34 +0200 |
|---|---|---|
| committer | Stefan Krah <skrah@bytereef.org> | 2012-04-01 23:25:34 +0200 |
| commit | 41e031004bd156ea579a35d8e1d74cafe8dac3e0 (patch) | |
| tree | 9e788a19a81993c9eb54f85be6feb8a83040e324 /Modules/_decimal/tests | |
| parent | 8dbbae990c28c31f54d26f2e50c2155fd9e9b084 (diff) | |
| download | cpython-git-41e031004bd156ea579a35d8e1d74cafe8dac3e0.tar.gz | |
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/tests')
| -rw-r--r-- | Modules/_decimal/tests/bench.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py index 013f0f666b..ea0823a0da 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]: |
