Skip to content

Commit 9370860

Browse files
authored
Apply suggestions from code review
1 parent 70e0037 commit 9370860

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pydatastructs/graphs/tests/test_algorithms.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ def _test_minimum_spanning_tree(func, ds, algorithm, *args):
187187

188188
def _test_minimum_spanning_tree_cpp(ds, algorithm, *args):
189189
if (ds == 'List' and algorithm == "prim"):
190-
a1 = AdjacencyListGraphNode('a',0, backend = Backend.CPP)
191-
b1 = AdjacencyListGraphNode('b',0, backend = Backend.CPP)
192-
c1 = AdjacencyListGraphNode('c',0, backend = Backend.CPP)
193-
d1 = AdjacencyListGraphNode('d',0, backend = Backend.CPP)
194-
e1 = AdjacencyListGraphNode('e',0, backend = Backend.CPP)
190+
a1 = AdjacencyListGraphNode('a', 0, backend = Backend.CPP)
191+
b1 = AdjacencyListGraphNode('b', 0, backend = Backend.CPP)
192+
c1 = AdjacencyListGraphNode('c', 0, backend = Backend.CPP)
193+
d1 = AdjacencyListGraphNode('d', 0, backend = Backend.CPP)
194+
e1 = AdjacencyListGraphNode('e', 0, backend = Backend.CPP)
195195
g = Graph(a1, b1, c1, d1, e1, backend = Backend.CPP)
196196
g.add_edge(a1.name, c1.name, 10)
197197
g.add_edge(c1.name, a1.name, 10)
@@ -206,10 +206,10 @@ def _test_minimum_spanning_tree_cpp(ds, algorithm, *args):
206206
mst = minimum_spanning_tree(g, "prim", backend = Backend.CPP)
207207
expected_mst = ["('a', 'd', 7)", "('d', 'c', 9)", "('e', 'd', 23)", "('b', 'd', 32)",
208208
"('d', 'a', 7)", "('c', 'd', 9)", "('d', 'e', 23)", "('d', 'b', 32)"]
209-
assert str(mst.get_edge('a','d')) in expected_mst
210-
assert str(mst.get_edge('e','d')) in expected_mst
211-
assert str(mst.get_edge('d','c')) in expected_mst
212-
assert str(mst.get_edge('b','d')) in expected_mst
209+
assert str(mst.get_edge('a', 'd')) in expected_mst
210+
assert str(mst.get_edge('e', 'd')) in expected_mst
211+
assert str(mst.get_edge('d', 'c')) in expected_mst
212+
assert str(mst.get_edge('b', 'd')) in expected_mst
213213
assert mst.num_edges() == 8
214214
a=AdjacencyListGraphNode('0', 0, backend = Backend.CPP)
215215
b=AdjacencyListGraphNode('1', 0, backend = Backend.CPP)
@@ -223,7 +223,7 @@ def _test_minimum_spanning_tree_cpp(ds, algorithm, *args):
223223
g2.add_edge('1', '2', 74)
224224
g2.add_edge('2', '1', 74)
225225
mst2=minimum_spanning_tree(g2, "prim", backend = Backend.CPP)
226-
assert mst2.num_edges()==6
226+
assert mst2.num_edges() == 6
227227

228228
fmst = minimum_spanning_tree
229229
fmstp = minimum_spanning_tree_parallel

0 commit comments

Comments
 (0)