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