summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-09 10:02:53 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-07-09 10:02:53 (GMT)
commit5aa478badfabb005e6f17c98fcf007a0bc54eecc (patch)
treeea3fdbf9730756faf600180da8b9b02229ff9c68 /Lib/test/test_decimal.py
parent563e44972922b98db06f06b81b049d1941fd43d9 (diff)
downloadcpython-5aa478badfabb005e6f17c98fcf007a0bc54eecc.zip
cpython-5aa478badfabb005e6f17c98fcf007a0bc54eecc.tar.gz
cpython-5aa478badfabb005e6f17c98fcf007a0bc54eecc.tar.bz2
Module and tests:
* Map conditions to related signals. * Make contexts unhashable. * Eliminate used "default" attribute in exception definitions. * Eliminate the _filterfunc in favor of a straight list. Docs: * Eliminate documented references to conditions that are not signals. * Eliminate parenthetical notes such as "1/0 --> Inf" which are no longer true with the new defaults.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index a03b784..e6d9389 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -60,12 +60,12 @@ EXTENDEDERRORTEST = False
#Map the test cases' error names to the actual errors
ErrorNames = {'clamped' : Clamped,
- 'conversion_syntax' : ConversionSyntax,
+ 'conversion_syntax' : InvalidOperation,
'division_by_zero' : DivisionByZero,
- 'division_impossible' : DivisionImpossible,
- 'division_undefined' : DivisionUndefined,
+ 'division_impossible' : InvalidOperation,
+ 'division_undefined' : InvalidOperation,
'inexact' : Inexact,
- 'invalid_context' : InvalidContext,
+ 'invalid_context' : InvalidOperation,
'invalid_operation' : InvalidOperation,
'overflow' : Overflow,
'rounded' : Rounded,
@@ -131,6 +131,7 @@ class DecimalTest(unittest.TestCase):
return
for line in open(file).xreadlines():
line = line.replace('\r\n', '').replace('\n', '')
+ #print line
try:
t = self.eval_line(line)
except ConversionSyntax:
@@ -648,7 +649,6 @@ class DecimalArithmeticOperatorsTest(unittest.TestCase):
self.assertEqual(d1, Decimal('-0.625'))
def test_floor_division(self):
- '''Test floor division in all its ways.'''
d1 = Decimal('5')
d2 = Decimal('2')
@@ -676,7 +676,6 @@ class DecimalArithmeticOperatorsTest(unittest.TestCase):
self.assertEqual(d1, Decimal('1'))
def test_powering(self):
- '''Test powering in all its ways.'''
d1 = Decimal('5')
d2 = Decimal('2')