[Python-checkins] python/nondist/sandbox/decimal test_Decimal.py,
1.13, 1.14
facundobatista at users.sourceforge.net
facundobatista at users.sourceforge.net
Sun Apr 4 00:01:06 EST 2004
Update of /cvsroot/python/python/nondist/sandbox/decimal
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16330
Modified Files:
test_Decimal.py
Log Message:
Adjusted implicit and explicit construction test cases.
Index: test_Decimal.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/test_Decimal.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_Decimal.py 3 Apr 2004 02:16:03 -0000 1.13
--- test_Decimal.py 4 Apr 2004 05:01:02 -0000 1.14
***************
*** 490,495 ****
#very large positive
! d = Decimal(5000000123)
! self.assertEqual(str(d), '5000000123')
#negative
--- 490,495 ----
#very large positive
! d = Decimal(500000123)
! self.assertEqual(str(d), '500000123')
#negative
***************
*** 553,557 ****
#inexact float, rounded to some positions
! d = Decimal.from_float(2.2, 17)
self.assertEqual(str(d), '2.2000000000000002')
--- 553,557 ----
#inexact float, rounded to some positions
! d = Decimal.from_float(2.2, 16)
self.assertEqual(str(d), '2.2000000000000002')
***************
*** 589,595 ****
#very large positive
! d = Decimal(5000000123)
e = Decimal(d)
! self.assertEqual(str(e), '5000000123')
self.assertNotEqual(id(d), id(e))
--- 589,595 ----
#very large positive
! d = Decimal(500000123)
e = Decimal(d)
! self.assertEqual(str(e), '500000123')
self.assertNotEqual(id(d), id(e))
***************
*** 632,636 ****
try:
d + 123456789000
! except TypeError:
pass
else:
--- 632,636 ----
try:
d + 123456789000
! except ValueError:
pass
else:
More information about the Python-checkins
mailing list