MCPcopy Index your code
hub / github.com/clips/pattern / test_sorted

Method test_sorted

test/test_graph.py:259–265  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

257 print "pattern.graph.Graph.betweenness_centrality()"
258
259 def test_sorted(self):
260 # Assert graph node sorting
261 o1 = self.g.sorted(order=graph.WEIGHT, threshold=0.0)
262 o2 = self.g.sorted(order=graph.CENTRALITY, threshold=0.0)
263 self.assertEqual(o1[0], self.g["c"])
264 self.assertEqual(o2[0], self.g["b"])
265 print "pattern.graph.Graph.sorted()"
266
267 def test_prune(self):
268 # Assert leaf pruning.

Callers

nothing calls this directly

Calls 1

sortedMethod · 0.80

Tested by

no test coverage detected