Beispiel #1
0
 def test_cast_bigger_string_to_byte(self):
     self.assertEqual(
         cast_to_byte("-1024", StringType(), options=BASE_OPTIONS), None)
Beispiel #2
0
 def test_cast_small_string_to_byte(self):
     self.assertEqual(
         cast_to_byte("-127", StringType(), options=BASE_OPTIONS), -127)
Beispiel #3
0
 def test_cast_float_to_byte_with_loop(self):
     self.assertEqual(
         cast_to_byte(-730.8, FloatType(), options=BASE_OPTIONS), 38)
Beispiel #4
0
 def test_cast_date_to_byte(self):
     self.assertEqual(
         cast_to_byte(datetime.date(2019, 8, 28),
                      DateType(),
                      options=BASE_OPTIONS), None)
Beispiel #5
0
 def test_cast_float_to_byte(self):
     self.assertEqual(
         cast_to_byte(-128.8, FloatType(), options=BASE_OPTIONS), -128)