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