Exemplo n.º 1
0
 def test_with_an_array_containing_8_elements_and_a_long_match(self):
     assert recursive_binary_search(ARRAY_8_ELTS, 8) == "match"
Exemplo n.º 2
0
 def test_with_an_array_containing_7_elements_and_no_match(self):
     assert recursive_binary_search(ARRAY_7_ELTS, 42) == "no match"
Exemplo n.º 3
0
 def test_with_an_array_containing_one_element_that_matches(self):
     assert recursive_binary_search([42], 42) == "match"
Exemplo n.º 4
0
 def test_with_an_array_containing_one_element_that_does_not_match(self):
     assert recursive_binary_search([41], 42) == "no match"
Exemplo n.º 5
0
 def test_with_an_empty_array(self):
     assert recursive_binary_search([], 42) == "no match"