We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b43a826 commit fa0b4baCopy full SHA for fa0b4ba
exercises/binary-search/binary_search_test.py
@@ -2,7 +2,7 @@
2
3
from binary_search import binary_search
4
5
-# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
+# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0
6
7
8
class BinarySearchTest(unittest.TestCase):
@@ -44,6 +44,10 @@ def test_empty_array(self):
44
with self.assertRaisesWithMessage(ValueError):
45
binary_search([], 1)
46
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
+
51
# Utility functions
52
def setUp(self):
53
try:
0 commit comments