Skip to content

Commit fa0b4ba

Browse files
binary-search: updated tests to 1.3.0 (exercism#1648)
Adds test case. Fixes exercism#1623
1 parent b43a826 commit fa0b4ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

exercises/binary-search/binary_search_test.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from binary_search import binary_search
44

5-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
5+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0
66

77

88
class BinarySearchTest(unittest.TestCase):
@@ -44,6 +44,10 @@ def test_empty_array(self):
4444
with self.assertRaisesWithMessage(ValueError):
4545
binary_search([], 1)
4646

47+
def test_nothing_is_found_when_left_and_right_bounds_cross(self):
48+
with self.assertRaisesWithMessage(ValueError):
49+
binary_search([1, 2], 0)
50+
4751
# Utility functions
4852
def setUp(self):
4953
try:

0 commit comments

Comments
 (0)