From 079f839d819f03413939409c58930d14017fd84f Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sun, 29 Jan 2023 14:58:35 -0500 Subject: [PATCH] fix assertions in test_graph to actually test results (#2906) --- tests/util/test_graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/util/test_graph.py b/tests/util/test_graph.py index b6b60ec29..77c1ab1e2 100644 --- a/tests/util/test_graph.py +++ b/tests/util/test_graph.py @@ -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) @@ -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)