Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(36)  |  Call(36)  |  Derive(0)  |  Import(0)

src/b/i/biopython-1.63/Tests/test_PhyloXML.py   biopython(Download)
    def test_parse(self):
        trees = PhyloXMLIO.parse(source)
        self.assertEqual(len(list(trees)), count)
 
    test_parse.__doc__ = "Parse the phylogenies in %s." % fname
    def test_shape(self):
        trees = PhyloXMLIO.parse(source)
        for tree, shape_expect in zip(trees, shapes):
            self.assertEqual(len(tree.clade), len(shape_expect))
            for clade, sub_expect in zip(tree.clade, shape_expect):
    def test_Phylogeny(self):
        """Instantiation of Phylogeny objects."""
        trees = list(PhyloXMLIO.parse(EX_PHYLO))
        # Monitor lizards
        self.assertEqual(trees[9].name, 'monitor lizards')
    def test_Clade(self):
        """Instantiation of Clade objects."""
        tree = list(PhyloXMLIO.parse(EX_PHYLO))[6]
        clade_ab, clade_c = tree.clade.clades
        clade_a, clade_b = clade_ab.clades
    def test_Annotation(self):
        """Instantiation of Annotation objects."""
        tree = list(PhyloXMLIO.parse(EX_PHYLO))[3]
        ann = tree.clade[1].sequences[0].annotations[0]
        self.assertTrue(isinstance(ann, PX.Annotation))

src/b/i/biopython-HEAD/Tests/test_PhyloXML.py   biopython(Download)
    def test_parse(self):
        trees = PhyloXMLIO.parse(source)
        self.assertEqual(len(list(trees)), count)
 
    test_parse.__doc__ = "Parse the phylogenies in %s." % fname
    def test_shape(self):
        trees = PhyloXMLIO.parse(source)
        for tree, shape_expect in zip(trees, shapes):
            self.assertEqual(len(tree.clade), len(shape_expect))
            for clade, sub_expect in zip(tree.clade, shape_expect):
    def test_Phylogeny(self):
        """Instantiation of Phylogeny objects."""
        trees = list(PhyloXMLIO.parse(EX_PHYLO))
        # Monitor lizards
        self.assertEqual(trees[9].name, 'monitor lizards')
    def test_Clade(self):
        """Instantiation of Clade objects."""
        tree = list(PhyloXMLIO.parse(EX_PHYLO))[6]
        clade_ab, clade_c = tree.clade.clades
        clade_a, clade_b = clade_ab.clades
    def test_Annotation(self):
        """Instantiation of Annotation objects."""
        tree = list(PhyloXMLIO.parse(EX_PHYLO))[3]
        ann = tree.clade[1].sequences[0].annotations[0]
        self.assertTrue(isinstance(ann, PX.Annotation))