Example #1
0
 def test_cast_float_to_int_with_loop(self):
     self.assertEqual(
         cast_to_int(2147483648, LongType(), options=BASE_OPTIONS),
         -2147483648)
Example #2
0
 def test_cast_bigger_string_to_int(self):
     self.assertEqual(
         cast_to_int("2147483648", StringType(), options=BASE_OPTIONS),
         None)
Example #3
0
 def test_cast_float_to_int(self):
     self.assertEqual(
         cast_to_int(2147483647, LongType(), options=BASE_OPTIONS),
         2147483647)
Example #4
0
 def test_cast_small_string_to_int(self):
     self.assertEqual(
         cast_to_int("2147483647", StringType(), options=BASE_OPTIONS),
         2147483647)