Skip to content

Commit 553341a

Browse files
author
Codeflash Bot
committed
fix test
1 parent 5844043 commit 553341a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code_to_optimize/tests/pytest/test_topological_sort.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_topological_sort():
1010
g.addEdge(2, 3)
1111
g.addEdge(3, 1)
1212

13-
assert g.topologicalSort() == [5, 4, 2, 3, 1, 0]
13+
assert g.topologicalSort()[0] == [5, 4, 2, 3, 1, 0]
1414

1515

1616
def test_topological_sort_2():
@@ -20,15 +20,15 @@ def test_topological_sort_2():
2020
for j in range(i + 1, 10):
2121
g.addEdge(i, j)
2222

23-
assert g.topologicalSort() == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
23+
assert g.topologicalSort()[0] == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
2424

2525
g = Graph(10)
2626

2727
for i in range(10):
2828
for j in range(i + 1, 10):
2929
g.addEdge(i, j)
3030

31-
assert g.topologicalSort() == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
31+
assert g.topologicalSort()[0] == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
3232

3333

3434
def test_topological_sort_3():
@@ -38,4 +38,4 @@ def test_topological_sort_3():
3838
for j in range(i + 1, 1000):
3939
g.addEdge(j, i)
4040

41-
assert g.topologicalSort() == list(reversed(range(1000)))
41+
assert g.topologicalSort()[0] == list(reversed(range(1000)))

0 commit comments

Comments
 (0)