コード例 #1
0
 def test_unsorted(self):
     self.assertEqual(solution([1, 3, 6, 4, 1, 2]), 5)
コード例 #2
0
 def test_all_negative(self):
     self.assertEqual(solution([-1, -3]), 1)
コード例 #3
0
 def test_big_array(self):
     array = [i for i in range(1000) if i != 105]
     self.assertEqual(solution(array), 105)
コード例 #4
0
 def test_mixed(self):
     self.assertEqual(solution([1, 2, -3, -50, 0, -1, 4, 5]), 3)
コード例 #5
0
 def test_sorted(self):
     self.assertEqual(solution([1, 2, 3]), 4)
コード例 #6
0
def test_missing_integer(A, expected):
    assert solution(A) == expected