Skip to content

Commit 07fe40d

Browse files
Add doc test to bubble_sort
1 parent 9f6633c commit 07fe40d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: sorts/bubble_sort.py

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def bubble_sort_recursive(collection: list[Any]) -> list[Any]:
8585
[1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7]
8686
>>> bubble_sort_recursive([1, 3.3, 5, 7.7, 2, 4.4, 6])
8787
[1, 2, 3.3, 4.4, 5, 6, 7.7]
88+
>>> bubble_sort_recursive(['a', 'Z','B', 'C', 'A', 'c'])
89+
['A', 'B', 'C', 'Z', 'a', 'c']
8890
>>> import random
8991
>>> collection_arg = random.sample(range(-50, 50), 100)
9092
>>> bubble_sort_recursive(collection_arg) == sorted(collection_arg)

0 commit comments

Comments
 (0)