Skip to content

Commit

Permalink
fix assertions in test_graph to actually test results (#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jan 29, 2023
1 parent 3295838 commit 079f839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/util/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_topological_order_cycle() -> None:
graph: dict[str, set[str]] = OrderedDict()
graph["A"] = {"B", "C"}
graph["B"] = {"A"}
with pytest.raises(ValueError, match="A | B"):
with pytest.raises(ValueError, match=r"^A \| B$"):
stable_topological_sort(graph)


Expand Down Expand Up @@ -68,5 +68,5 @@ def test_two_sub_graph_circle() -> None:
graph["A"] = {"B", "C"}
graph["B"] = {"A"}
graph["C"] = set()
with pytest.raises(ValueError, match="A | B"):
with pytest.raises(ValueError, match=r"^A \| B$"):
stable_topological_sort(graph)

0 comments on commit 079f839

Please sign in to comment.