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