Skip to content

Commit a9bc668

Browse files
authored
Add binary insertion sort to tests and rename function
Updated tests to include binary insertion sort and renamed test function.
1 parent 7e04048 commit a9bc668

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/test_sorts.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ def test_sort_matches_builtin(sort, case):
8989
assert list(sort(list(case))) == sorted(case)
9090

9191

92-
def test_binary_insertion_sort_rejects_non_comparable_items():
93-
with pytest.raises(TypeError):
94-
binary_insertion_sort([1, "a"])
95-
96-
9792
@pytest.mark.parametrize(
9893
"sort",
99-
[bubble_sort_iterative, bubble_sort_recursive],
94+
[
95+
binary_insertion_sort,
96+
bubble_sort_iterative,
97+
bubble_sort_recursive,
98+
insertion_sort
99+
],
100100
ids=lambda f: f.__name__,
101101
)
102-
def test_bubble_sort_rejects_non_comparable_items(sort):
102+
def test_sort_rejects_non_comparable_items(sort):
103103
with pytest.raises(TypeError):
104104
sort([1, "a"])

0 commit comments

Comments
 (0)