Exemple #1
0
 def test_decimal10(self):
     v = loads('1.2345e+27D')[0]
     self.assertAlmostEqual(v, decimal('1.2345e+27'))
Exemple #2
0
 def test_decimal8(self):
     v = loads('-1.2345e27D')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e27'))
Exemple #3
0
 def test_decimal9(self):
     v = loads('-1.2345e-27d')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e-27'))
Exemple #4
0
 def test_decimal6(self):
     v = loads('-1.2345e+5d')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e5'))
Exemple #5
0
 def test_decimal7(self):
     v = loads('-1.2345e-5D')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e-5'))
Exemple #6
0
 def test_decimal3(self):
     v = loads('123d')[0]
     self.assertAlmostEqual(v, decimal('123'))
Exemple #7
0
 def test_decimal4(self):
     v = loads('3.141528D')[0]
     self.assertAlmostEqual(v, decimal('3.141528'))
Exemple #8
0
 def test_decimal10(self):
     v = loads('1.2345e+27D')[0]
     self.assertAlmostEqual(v, decimal('1.2345e+27'))
Exemple #9
0
 def test_decimal2(self):
     v = loads('0.D')[0]
     self.assertAlmostEqual(v, decimal('0.'))
Exemple #10
0
 def test_decimal8(self):
     v = loads('-1.2345e27D')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e27'))
Exemple #11
0
 def test_decimal9(self):
     v = loads('-1.2345e-27d')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e-27'))
Exemple #12
0
 def test_decimal7(self):
     v = loads('-1.2345e-5D')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e-5'))
Exemple #13
0
 def test_decimal6(self):
     v = loads('-1.2345e+5d')[0]
     self.assertAlmostEqual(v, decimal('-1.2345e5'))
Exemple #14
0
 def test_decimal4(self):
     v = loads('3.141528D')[0]
     self.assertAlmostEqual(v, decimal('3.141528'))
Exemple #15
0
 def test_decimal3(self):
     v = loads('123d')[0]
     self.assertAlmostEqual(v, decimal('123'))
Exemple #16
0
 def test_decimal2(self):
     v = loads('0.D')[0]
     self.assertAlmostEqual(v, decimal('0.'))