Skip to content

Commit bbe93ad

Browse files
committed
update tests
1 parent b47e45e commit bbe93ad

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

searches/interpolation_search.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ def interpolation_search(sorted_collection: list[int], item: int) -> int | None:
1818
1
1919
>>> interpolation_search([1, 2, 3, 4, 5], 4)
2020
3
21-
>>> interpolation_search([1, 2, 3, 4, 5], 6)
22-
>>> interpolation_search([], 1)
21+
>>> interpolation_search([1, 2, 3, 4, 5], 6) is None
22+
>>> interpolation_search([], 1) is None
2323
>>> interpolation_search([100], 100)
2424
0
25-
>>> interpolation_search([1, 2, 3, 4, 5], 0)
26-
>>> interpolation_search([1, 2, 3, 4, 5], 7)
25+
>>> interpolation_search([1, 2, 3, 4, 5], 0) is None
26+
>>> interpolation_search([1, 2, 3, 4, 5], 7) is None
2727
>>> interpolation_search([1, 2, 3, 4, 5], 2)
2828
1
29-
>>> interpolation_search([1, 2, 3, 4, 5], 0)
30-
>>> interpolation_search([1, 2, 3, 4, 5], 7)
29+
>>> interpolation_search([1, 2, 3, 4, 5], 0) is None
30+
>>> interpolation_search([1, 2, 3, 4, 5], 7) is None
3131
>>> interpolation_search([1, 2, 3, 4, 5], 2)
3232
1
33-
>>> interpolation_search([5, 5, 5, 5, 5], 3)
33+
>>> interpolation_search([5, 5, 5, 5, 5], 3) is None
3434
"""
3535
left = 0
3636
right = len(sorted_collection) - 1

0 commit comments

Comments
 (0)