summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-14 16:35:30 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-07-14 16:35:30 (GMT)
commitb91af521fddac47b14c57cd9ba736775334e6379 (patch)
tree8611dd08fc9ef766ab216dd12fc14b583ddef517 /Lib/test/test_decimal.py
parentfed52963fcf97154e0b7d1d82514767d95eb27e5 (diff)
downloadcpython-b91af521fddac47b14c57cd9ba736775334e6379.zip
cpython-b91af521fddac47b14c57cd9ba736775334e6379.tar.gz
cpython-b91af521fddac47b14c57cd9ba736775334e6379.tar.bz2
* Hide a loop induction variable that was inadvertantly being picked up
by the locals() call in the context constructor. * Remove unnecessary properties for int, exp, and sign which duplicated information returned by as_tuple().
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 2415a78..0a23808 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -954,34 +954,6 @@ class DecimalUsabilityTest(unittest.TestCase):
d = Decimal("Infinity")
self.assertEqual(d.as_tuple(), (0, (0,), 'F') )
- def test_immutability_onpurpose(self):
- #Try to change internal objects and see if immutable.
-
- d = Decimal(42)
-
- #you can get the attributes...
- d.exp
- d.int
- d.sign
-
- #...but not change them!
- try:
- d.exp = 20
- d.int = 3
- d.sign = 1
- except AttributeError:
- pass
- else:
- self.fail('Did not raised an error!')
-
- #some new attribute
- try:
- d.newone = None
- except AttributeError:
- pass
- else:
- self.fail('Did not raised an error!')
-
def test_immutability_operations(self):
# Do operations and check that it didn't change change internal objects.