Skip to content

Commit 2eeb150

Browse files
authored
Modify doctest to ignore exception details
Updated doctest to ignore exception details for invalid graph input.
1 parent e7e2971 commit 2eeb150

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

graphs/travelling_salesman_problem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ 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]})
43+
>>> validate_graph({"A": [10, 20], "B": [30, "invalid"], "C": [15, 35]}). # doctest: +IGNORE_EXCEPTION_DETAIL
4444
Traceback (most recent call last):
4545
...
4646
InvalidGraphError: Each node must have a valid 2D coordinate [x, y]

0 commit comments

Comments
 (0)