summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-03 12:26:21 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-07-03 12:26:21 (GMT)
commit6ea484582238a65d44a76e3a831e3ba7c77a1a25 (patch)
treeabdd01ed161e69aaacf21a8502287046dbda1c94 /Lib/test
parent17c52d84934ff85efc26db3a040ce85cfb154488 (diff)
downloadcpython-6ea484582238a65d44a76e3a831e3ba7c77a1a25.zip
cpython-6ea484582238a65d44a76e3a831e3ba7c77a1a25.tar.gz
cpython-6ea484582238a65d44a76e3a831e3ba7c77a1a25.tar.bz2
* Make the tests independent of the default precision.
* Change the default precision to 28 (to match VB's decimal type).
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_decimal.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 6da658f..7bfb13c 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -34,6 +34,13 @@ from decimal import *
from test.test_support import TestSkipped, run_unittest, run_doctest, is_resource_enabled
import threading
+# Tests are built around these assumed context defaults
+DefaultContext.prec=9
+DefaultContext.rounding=ROUND_HALF_EVEN
+DefaultContext.trap_enablers=dict.fromkeys(Signals, 0)
+setcontext(DefaultContext)
+
+
TESTDATADIR = 'decimaltestdata'
if __name__ == '__main__':
file = sys.argv[0]