Exemplo n.º 1
0
 def test_check_list_or_tuple_for_types_edge_case_int_and_long(self):
     message = fh.check_list_or_tuple_for_types((1, 10**1000), (int, ),
                                                'error')
     self.assertEqual(message, '')
Exemplo n.º 2
0
 def test_check_list_or_tuple_for_types_returns_error_when_not_passed_iterable(
         self):
     message = fh.check_list_or_tuple_for_types(1, (int, ), 'error')
     self.assertEqual(message, 'error')
Exemplo n.º 3
0
 def test_check_list_or_tuple_for_types_with_error_many_types(self):
     message = fh.check_list_or_tuple_for_types((1., 2., 'a'),
                                                (float, list), 'error')
     self.assertEqual(message, 'error')
Exemplo n.º 4
0
 def test_check_list_or_tuple_for_types_with_error_one_type(self):
     message = fh.check_list_or_tuple_for_types((1., 2., 3.), (str, ),
                                                'error')
     self.assertEqual(message, 'error')
Exemplo n.º 5
0
 def test_check_list_or_tuple_for_types_no_error_empty_list(self):
     message = fh.check_list_or_tuple_for_types([], (int, ), 'error')
     self.assertEqual(message, '')
Exemplo n.º 6
0
 def test_check_list_or_tuple_for_types_no_error_many_data_types(self):
     message = fh.check_list_or_tuple_for_types(
         ('a', 'b', 'c'), (float, list, str, tuple), 'error')
     self.assertEqual(message, '')
Exemplo n.º 7
0
 def test_check_list_or_tuple_for_types_no_error_many_types_data(self):
     message = fh.check_list_or_tuple_for_types((1., 'hi', [1, 2]),
                                                (float, list, str), 'error')
     self.assertEqual(message, '')