def test_custom_binary_predicate_second(self): assert pyaoi.search_n( [(1, 2), (3, 4), (3, 4), (5, 6)], (3, 4), 2, lambda x, y: x[0] == y[1] and x[1] == y[1], )
def test_super_empty(self): assert pyaoi.search_n([], 10, 5) == -1
def test_not_present(self): assert pyaoi.search_n([1, 2, 3, 4, 5], 6, 2) == -1
def test_third(self): assert pyaoi.search_n([1, 2, 3, 4, 5], 3, 1) == 2
def test_end(self): assert pyaoi.search_n([1, 2, 3, 4, 4, 4], 4, 2) == 3
def test_beginning(self): assert pyaoi.search_n([1, 1, 1, 2, 3, 4, 5], 1, 2) == 0