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