Skip to content

Commit df5b3b5

Browse files
committed
CI: Modify python tests for new changes
1 parent c0f9f94 commit df5b3b5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/rustworkx_tests/graph/test_cycle_basis.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,30 @@ def setUp(self):
9191

9292
def test_cycle_basis_edges(self):
9393
graph = self.graph
94-
res = sorted(sorted(c) for c in rustworkx.cycle_basis(graph, 0, True))
94+
res = sorted(sorted(c) for c in rustworkx.cycle_basis_edges(graph, 0))
9595
self.assertEqual([[0, 1, 2], [4, 5, 6]], res)
9696

9797
def test_cycle_basis_edges_multiple_roots_same_cycles(self):
98-
res = sorted(sorted(x) for x in rustworkx.cycle_basis(self.graph, 0, True))
98+
res = sorted(sorted(x) for x in rustworkx.cycle_basis_edges(self.graph, 0))
9999
self.assertEqual([[0, 1, 2], [4, 5, 6]], res)
100-
res = sorted(sorted(x) for x in rustworkx.cycle_basis(self.graph, 5, True))
100+
res = sorted(sorted(x) for x in rustworkx.cycle_basis_edges(self.graph, 5))
101101
self.assertEqual([[0, 1, 2], [4, 5, 6]], res)
102-
res = sorted(sorted(x) for x in rustworkx.cycle_basis(self.graph, 7, True))
102+
res = sorted(sorted(x) for x in rustworkx.cycle_basis_edges(self.graph, 7))
103103
self.assertEqual([[0, 1, 2], [4, 5, 6]], res)
104104

105-
def test_cycle_basis_disconnected_graphs(self):
105+
def test_cycle_basis_edges_disconnected_graphs(self):
106106
self.graph.add_nodes_from(["A", "B", "C"])
107107
self.graph.add_edges_from_no_data([(10, 11), (10, 12), (11, 12)])
108-
cycles = rustworkx.cycle_basis(self.graph, 9, True)
108+
cycles = rustworkx.cycle_basis_edges(self.graph, 9)
109109
res = sorted(sorted(x) for x in cycles[:-1]) + [sorted(cycles[-1])]
110110
self.assertEqual(res, [[0, 1, 2], [4, 5, 6], [11, 12, 13]])
111111

112112
def test_invalid_types(self):
113113
digraph = rustworkx.PyDiGraph()
114114
with self.assertRaises(TypeError):
115-
rustworkx.cycle_basis(digraph, edges=True)
115+
rustworkx.cycle_basis_edges(digraph)
116116

117117
def test_self_loop(self):
118118
self.graph.add_edge(1, 1, None)
119-
res = sorted(sorted(c) for c in rustworkx.cycle_basis(self.graph, 0, edges=True))
119+
res = sorted(sorted(c) for c in rustworkx.cycle_basis_edges(self.graph, 0))
120120
self.assertEqual([[0, 1, 2], [4, 5, 6], [11]], res)

0 commit comments

Comments
 (0)