예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
 def test_getApproximateNumAnnotationsZero(self):
     nodeId = 606
     node = tp.utils.getNodeById(nodeId, self.graph)
     self.assertTrue(tp.getApproximateNumAnnotations(node, self.graph) == 2)
예제 #4
0
 def test_getApproximateNumAnnotationsZero(self):
     nodeId = 606
     node = tp.utils.getNodeById(nodeId, self.graph)
     self.assertTrue(tp.getApproximateNumAnnotations(node, self.graph) == 2)