def test_getApproximateNumAnnotationsOne(self): self.file = '../data/test_one.tlp' self.graph = tlp.loadGraph(self.file) nodeId = 176 expectedNumAnnotations = 9 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue(tp.getApproximateNumAnnotations(node, self.graph) == expectedNumAnnotations) nodeId = 606 expectedNumAnnotations = 34 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue(tp.getApproximateNumAnnotations(node, self.graph) == expectedNumAnnotations) nodeId = 5530 expectedNumAnnotations = 59 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue(tp.getApproximateNumAnnotations(node, self.graph) == expectedNumAnnotations)
def test_getApproximateNumAnnotationsOne(self): self.file = '../data/test_one.tlp' self.graph = tlp.loadGraph(self.file) nodeId = 176 expectedNumAnnotations = 9 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue( tp.getApproximateNumAnnotations(node, self.graph) == expectedNumAnnotations) nodeId = 606 expectedNumAnnotations = 34 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue( tp.getApproximateNumAnnotations(node, self.graph) == expectedNumAnnotations) nodeId = 5530 expectedNumAnnotations = 59 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue( tp.getApproximateNumAnnotations(node, self.graph) == expectedNumAnnotations)
def test_getApproximateNumAnnotationsZero(self): nodeId = 606 node = tp.utils.getNodeById(nodeId, self.graph) self.assertTrue(tp.getApproximateNumAnnotations(node, self.graph) == 2)