Skip to content

Commit d435d80

Browse files
committed
Add doctest
1 parent 7552c4e commit d435d80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

data_structures/linked_list/cycle_detection_and_removal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
from typing import Any
4+
import doctest
45

56

67
class ContainsLoopError(Exception):
@@ -91,6 +92,7 @@ def remove_loop(self) -> None:
9192

9293

9394
if __name__ == "__main__":
95+
doctest.testmod()
9496
root_node = Node(1)
9597
root_node.next_node = Node(2)
9698
root_node.next_node.next_node = Node(3)

0 commit comments

Comments
 (0)