def test_cast_float_to_int_with_loop(self): self.assertEqual( cast_to_int(2147483648, LongType(), options=BASE_OPTIONS), -2147483648)
def test_cast_bigger_string_to_int(self): self.assertEqual( cast_to_int("2147483648", StringType(), options=BASE_OPTIONS), None)
def test_cast_float_to_int(self): self.assertEqual( cast_to_int(2147483647, LongType(), options=BASE_OPTIONS), 2147483647)
def test_cast_small_string_to_int(self): self.assertEqual( cast_to_int("2147483647", StringType(), options=BASE_OPTIONS), 2147483647)