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