Skip to content

Commit e877f4f

Browse files
simplify test
1 parent f71dc2b commit e877f4f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/test_graph_tools.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,9 @@ def test_compute_topological_order():
7777
compute_topological_order(cycle)
7878

7979
cycle2 = {0: [2], 1: [2], 2: [3], 3: [1]}
80-
with pytest.raises(CycleError) as exc:
80+
with pytest.raises(CycleError, match=r"\[1, 2, 3\]"):
8181
compute_topological_order(cycle2)
8282

83-
assert str(exc.value) == "[1, 2, 3]"
84-
8583

8684
def test_transitive_closure():
8785
from pytools.graph import compute_transitive_closure

0 commit comments

Comments
 (0)