コード例 #1
0
ファイル: test_list.py プロジェクト: Max201510/category_tree
 def test_find_int_empty_list(self):
     idx = list.find_int(3, [])
     self.assertIsNone(idx)
コード例 #2
0
ファイル: test_list.py プロジェクト: Max201510/category_tree
 def test_find_int_not_found(self):
     idx = list.find_int(3, [1, 2, 4, 5, 7, 9])
     self.assertIsNone(idx)
コード例 #3
0
ファイル: test_list.py プロジェクト: Max201510/category_tree
 def test_find_int_single_element_list(self):
     idx = list.find_int(3, [
         3,
     ])
     self.assertEqual(idx, 0)
コード例 #4
0
ファイル: test_list.py プロジェクト: Max201510/category_tree
 def test_find_int_first_half(self):
     idx = list.find_int(4, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 2)
コード例 #5
0
ファイル: test_list.py プロジェクト: Max201510/category_tree
 def test_find_int_second_half(self):
     idx = list.find_int(7, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 4)
コード例 #6
0
 def test_find_int_empty_list(self):
     idx = list.find_int(3, [])
     self.assertIsNone(idx)
コード例 #7
0
 def test_find_int_single_element_list(self):
     idx = list.find_int(3, [3, ])
     self.assertEqual(idx, 0)
コード例 #8
0
 def test_find_int_not_found(self):
     idx = list.find_int(3, [1, 2, 4, 5, 7, 9])
     self.assertIsNone(idx)
コード例 #9
0
 def test_find_int_second_half(self):
     idx = list.find_int(7, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 4)
コード例 #10
0
 def test_find_int_first_half(self):
     idx = list.find_int(4, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 2)