Пример #1
0
 def test_good6(self):
   self.real = Float.check_float("0.00057")
   correct_real = 0.00057
   self.assertEqual( correct_real, self.real)
Пример #2
0
 def test_good4(self):
   self.real = Float.check_float("-0.09817518569")
   correct_real = -9.817517518569e-2
   self.assertEqual( correct_real, self.real)
Пример #3
0
 def test_good5(self):
   self.real = Float.check_float("72.86")
   correct_real = 72.86
   self.assertEqual( correct_real, self.real)
Пример #4
0
 def test_middle3(self):
   self.real = Float.check_float("78000000000000000")
   correct_real = 78.0e+15
   self.assertEqual( correct_real, self.real)
Пример #5
0
 def test_bad2(self):
   self.real = Float.check_float("57895")
   correct_real = 57895.0
   self.assertEqual( correct_real, self.real)
Пример #6
0
 def test_bad1(self):
   self.real = Float.check_float("etiuf35073.^^34io")
   correct_real = 35073.34
   self.assertEqual( correct_real, self.real)
Пример #7
0
 def test_vbad0(self):
   self.real = Float.check_float("")
   correct_real = 0.0
   self.assertEqual( correct_real, self.real)
Пример #8
0
 def setUp(self):
   self.real = Float.check_float("")