diff options
author | Raymond Hettinger <python@rcn.com> | 2004-07-14 15:41:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-07-14 15:41:57 (GMT) |
commit | fed52963fcf97154e0b7d1d82514767d95eb27e5 (patch) | |
tree | 4d799d9b5fb58b6bcb9a242b39260b68918fc7d9 /Lib/test | |
parent | b60b242d290d677fc9eaf063a383f8f5465b9b18 (diff) | |
download | cpython-fed52963fcf97154e0b7d1d82514767d95eb27e5.zip cpython-fed52963fcf97154e0b7d1d82514767d95eb27e5.tar.gz cpython-fed52963fcf97154e0b7d1d82514767d95eb27e5.tar.bz2 |
* Rename "Signals" to "_signals" making it non-public.
* Context.create_decimal can take a zero default just like Decimal().
* Fix typo in comment.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_decimal.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py index 6354063..2415a78 100644 --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -35,6 +35,9 @@ from test.test_support import TestSkipped, run_unittest, run_doctest, is_resourc import threading import random +# Useful Test Constant +Signals = getcontext().flags.keys() + # Tests are built around these assumed context defaults DefaultContext.prec=9 DefaultContext.rounding=ROUND_HALF_EVEN @@ -480,7 +483,10 @@ class DecimalExplicitConstructionTest(unittest.TestCase): nc.prec = 3 # empty - self.assertRaises(TypeError, nc.create_decimal) + d = Decimal() + self.assertEqual(str(d), '0') + d = nc.create_decimal() + self.assertEqual(str(d), '0') # from None self.assertRaises(TypeError, nc.create_decimal, None) |