Topological sort is non deterministic, only check for logic in test and not exact result so it will pass tests under py3.5
This commit is contained in:
@ -67,6 +67,7 @@ def test_graph_topological_sort():
|
|||||||
_output=sentinel.a2,
|
_output=sentinel.a2,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert g.topologically_sorted_indexes == (0, 3, 4, 1, 2)
|
assert g.topologically_sorted_indexes[-2:] == (1, 2)
|
||||||
|
assert g.topologically_sorted_indexes.index(3) < g.topologically_sorted_indexes.index(4)
|
||||||
assert g[3] == sentinel.b1
|
assert g[3] == sentinel.b1
|
||||||
assert g[4] == sentinel.b2
|
assert g[4] == sentinel.b2
|
||||||
|
|||||||
Reference in New Issue
Block a user