def test_cast_date_to_byte(self):
     self.assertEqual(
         cast_to_byte(datetime.date(2019, 8, 28),
                      DateType(),
                      options=BASE_OPTIONS),
         None,
     )
 def test_cast_float_to_byte_with_loop(self):
     self.assertEqual(
         cast_to_byte(-730.8, FloatType(), options=BASE_OPTIONS), 38)
 def test_cast_float_to_byte(self):
     self.assertEqual(
         cast_to_byte(-128.8, FloatType(), options=BASE_OPTIONS), -128)
 def test_cast_bigger_string_to_byte(self):
     self.assertEqual(
         cast_to_byte('-1024', StringType(), options=BASE_OPTIONS), None)
 def test_cast_small_string_to_byte(self):
     self.assertEqual(
         cast_to_byte('-127', StringType(), options=BASE_OPTIONS), -127)