Did I find the right examples for you? yes no

All Samples(14)  |  Call(12)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_phylip.py   cogent(Download)
#!/bin/env python
#file cogent/parse/test_phylip.py
"""Unit tests for the phylip parser
"""
from cogent.parse.phylip import MinimalPhylipParser, get_align_for_phylip
    def test_empty(self):
        """MinimalFastaParser should return empty list from 'file' w/o labels"""
        self.assertEqual(list(MinimalPhylipParser(self.empty)), [])
 
    def test_minimal_parser(self):
        """MinimalFastaParser should read single record as (label, seq) tuple"""
        seqs = list(MinimalPhylipParser(self.big_interleaved))
        self.assertEqual(seqs[0][0], 'Cow')
 
        seqs = list(MinimalPhylipParser(self.space_interleaved))
        self.assertEqual(len(seqs), 5)
        self.assertEqual(seqs[0][0], 'cox2_leita')
        self.assertEqual(seqs[-1][0], 'cox2_tborr')
        self.assertEqual(len(seqs[0][1]), 176)
        self.assertEqual(len(seqs[-1][1]), 176)
 
        seqs = list(MinimalPhylipParser(self.interleaved_little))

src/p/y/pycogent-HEAD/tests/test_parse/test_phylip.py   pycogent(Download)
#!/bin/env python
#file cogent/parse/test_phylip.py
"""Unit tests for the phylip parser
"""
from cogent.parse.phylip import MinimalPhylipParser, get_align_for_phylip
    def test_empty(self):
        """MinimalFastaParser should return empty list from 'file' w/o labels"""
        self.assertEqual(list(MinimalPhylipParser(self.empty)), [])
 
    def test_minimal_parser(self):
        """MinimalFastaParser should read single record as (label, seq) tuple"""
        seqs = list(MinimalPhylipParser(self.big_interleaved))
        self.assertEqual(seqs[0][0], 'Cow')
 
        seqs = list(MinimalPhylipParser(self.space_interleaved))
        self.assertEqual(len(seqs), 5)
        self.assertEqual(seqs[0][0], 'cox2_leita')
        self.assertEqual(seqs[-1][0], 'cox2_tborr')
        self.assertEqual(len(seqs[0][1]), 176)
        self.assertEqual(len(seqs[-1][1]), 176)
 
        seqs = list(MinimalPhylipParser(self.interleaved_little))