Skip to content

Commit db16116

Browse files
authored
Fix doctest formatting for validate_graph function
Updated doctest format for invalid graph validation.
1 parent 2eeb150 commit db16116

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

graphs/travelling_salesman_problem.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def validate_graph(graph_points: dict[str, list[float]]) -> None:
4040
:raises InvalidGraphError: If the graph points are not valid
4141
4242
>>> validate_graph({"A": [10, 20], "B": [30, 21], "C": [15, 35]}) # Valid graph
43-
>>> validate_graph({"A": [10, 20], "B": [30, "invalid"], "C": [15, 35]}). # doctest: +IGNORE_EXCEPTION_DETAIL
43+
>>> validate_graph( # doctest: +IGNORE_EXCEPTION_DETAIL
44+
... {"A": [10, 20], "B": [30, "invalid"], "C": [15, 35]}
45+
... )
4446
Traceback (most recent call last):
4547
...
4648
InvalidGraphError: Each node must have a valid 2D coordinate [x, y]

0 commit comments

Comments
 (0)