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

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_cutg.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for the CUTG database parsers.
"""
from cogent.parse.cutg import CutgParser, CutgSpeciesParser, InfoFromLabel
from cogent.parse.record import RecordError
    def test_init(self):
        """InfoFromLabel should handle a typical label line"""
        i = InfoFromLabel(sample_gene[0])
        sa = self.assertEqual
        sa(i.GenBank, ['AB000406'])
        sa(i.GI, ['1783183'])
 
        j = InfoFromLabel(sample_gene[2])
        assert j.Refs is not i.Refs
        assert j._handler is not i._handler
    def test_init_unknown_db(self):
        """InfoFromLabel should handle a line whose database is unknown"""
        i = InfoFromLabel(strange_db)
        self.assertEqual(i.Locus, 'AB001737')
 

src/p/y/pycogent-HEAD/tests/test_parse/test_cutg.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for the CUTG database parsers.
"""
from cogent.parse.cutg import CutgParser, CutgSpeciesParser, InfoFromLabel
from cogent.parse.record import RecordError
    def test_init(self):
        """InfoFromLabel should handle a typical label line"""
        i = InfoFromLabel(sample_gene[0])
        sa = self.assertEqual
        sa(i.GenBank, ['AB000406'])
        sa(i.GI, ['1783183'])
 
        j = InfoFromLabel(sample_gene[2])
        assert j.Refs is not i.Refs
        assert j._handler is not i._handler
    def test_init_unknown_db(self):
        """InfoFromLabel should handle a line whose database is unknown"""
        i = InfoFromLabel(strange_db)
        self.assertEqual(i.Locus, 'AB001737')