Make mean boundary RAG testing more robust

This commit is contained in:
Juan Nunez-Iglesias
2016-01-08 17:25:10 +11:00
parent def8ca7f75
commit f9dfa1d81d
+4 -2
View File
@@ -211,5 +211,7 @@ def test_rag_boundary():
labels[8:, 8:] = 4
g = graph.rag_boundary(labels, edge_map, connectivity=1)
assert len(g.nodes()) == 4
assert len(g.edges()) == 4
assert set(g.nodes()) == set([1, 2, 3, 4])
assert set(g.edges()) == set([(1, 2), (1, 3), (2, 4), (3, 4)])
assert g[1][3]['weight'] == 0.25
assert g[2][4]['weight'] == 0.34375