mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
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.
This commit is contained in:
parent
563e449729
commit
5aa478badf
4 changed files with 45 additions and 88 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue