Skip to content

Commit 50ce48a

Browse files
committed
Add doctest for main function
1 parent c71e0cc commit 50ce48a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: graphs/bidirectional_search.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,15 @@ def bidirectional_search(
129129

130130

131131
def main() -> None:
132-
"""Run example of bidirectional search algorithm."""
132+
"""
133+
Run example of bidirectional search algorithm.
134+
135+
Examples:
136+
>>> main() # doctest: +NORMALIZE_WHITESPACE
137+
Path from 0 to 11: [0, 1, 3, 7, 11]
138+
Path from 5 to 5: [5]
139+
Path from 0 to 3: None
140+
"""
133141
# Example graph represented as an adjacency list
134142
example_graph = {
135143
0: [1, 2],

0 commit comments

Comments
 (0)