示例#1
0
 def test_date_conversion(self):
     rets_date = "2018-01-01T00:00:00.004"
     self.assertIs(type(cast(rets_date)), datetime)
示例#2
0
 def test_normal_string(self):
     normal_string = 'RETSdiculous'
     self.assertIs(type(cast(normal_string)), str)
示例#3
0
 def test_empty_string(self):
     empty_string = ''
     self.assertIsNone(cast(empty_string))
示例#4
0
 def test_zero_float(self):
     float_string = '0.0'
     self.assertIs(type(cast(float_string)), float)
示例#5
0
 def test_float_with_leading_zero(self):
     float_string = '0.56'
     self.assertIs(type(cast(float_string)), float)
示例#6
0
 def test_float_conversion(self):
     float_string = '2.56'
     self.assertIs(type(cast(float_string)), float)
示例#7
0
 def test_integer_conversion(self):
     int_string = '02882'
     self.assertIs(type(cast(int_string)), str)
示例#8
0
 def test_integer_conversion(self):
     int_string = '256'
     self.assertIs(type(cast(int_string)), int)