Skip to content

Commit 7c546b7

Browse files
author
deepshekhardas
committed
fix: add doctest.testmod() to gnome_sort.py
1 parent c0db072 commit 7c546b7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sorts/gnome_sort.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def gnome_sort(lst: list) -> list:
5151

5252

5353
if __name__ == "__main__":
54+
import doctest
55+
56+
doctest.testmod()
5457
user_input = input("Enter numbers separated by a comma:\n").strip()
5558
unsorted = [int(item) for item in user_input.split(",")]
5659
print(gnome_sort(unsorted))

0 commit comments

Comments
 (0)