Small fix that complicated the test actually when that

test failed.
This commit is contained in:
Facundo Batista 2008-03-22 02:45:37 +00:00
parent 3e838dd88d
commit 6415667fe2
1 changed files with 10 additions and 4 deletions

View File

@ -949,21 +949,27 @@ class DecimalArithmeticOperatorsTest(unittest.TestCase):
def thfunc1(cls): def thfunc1(cls):
d1 = Decimal(1) d1 = Decimal(1)
d3 = Decimal(3) d3 = Decimal(3)
cls.assertEqual(d1/d3, Decimal('0.333333333')) test1 = d1/d3
cls.synchro.wait() cls.synchro.wait()
cls.assertEqual(d1/d3, Decimal('0.333333333')) test2 = d1/d3
cls.finish1.set() cls.finish1.set()
cls.assertEqual(test1, Decimal('0.333333333'))
cls.assertEqual(test2, Decimal('0.333333333'))
return return
def thfunc2(cls): def thfunc2(cls):
d1 = Decimal(1) d1 = Decimal(1)
d3 = Decimal(3) d3 = Decimal(3)
cls.assertEqual(d1/d3, Decimal('0.333333333')) test1 = d1/d3
thiscontext = getcontext() thiscontext = getcontext()
thiscontext.prec = 18 thiscontext.prec = 18
cls.assertEqual(d1/d3, Decimal('0.333333333333333333')) test2 = d1/d3
cls.synchro.set() cls.synchro.set()
cls.finish2.set() cls.finish2.set()
cls.assertEqual(test1, Decimal('0.333333333'))
cls.assertEqual(test2, Decimal('0.333333333333333333'))
return return