From d5cfa0281da68bad8cce3b8a9dfb6df0ad538dc2 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Fri, 19 May 2017 18:38:41 +0200 Subject: [PATCH] Topological sort is non deterministic, only check for logic in test and not exact result so it will pass tests under py3.5 --- tests/structs/test_graphs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/structs/test_graphs.py b/tests/structs/test_graphs.py index 3afeaee..af1a6df 100644 --- a/tests/structs/test_graphs.py +++ b/tests/structs/test_graphs.py @@ -67,6 +67,7 @@ def test_graph_topological_sort(): _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[4] == sentinel.b2