Skip to content

Commit 079f839

Browse files
authored
fix assertions in test_graph to actually test results (#2906)
1 parent 3295838 commit 079f839

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/util/test_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_topological_order_cycle() -> None:
3333
graph: dict[str, set[str]] = OrderedDict()
3434
graph["A"] = {"B", "C"}
3535
graph["B"] = {"A"}
36-
with pytest.raises(ValueError, match="A | B"):
36+
with pytest.raises(ValueError, match=r"^A \| B$"):
3737
stable_topological_sort(graph)
3838

3939

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

0 commit comments

Comments
 (0)