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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_structure.py   cogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.core.entity import Structure
from cogent.parse.structure import FromFilenameStructureParser, FromFileStructureParser
 
__author__ = "Marcin Knight"
    def test_FromFileStructureParser(self):
        structure = FromFileStructureParser(open('data/1LJO.pdb'), 'pdb')
        assert isinstance(structure, Structure)
        self.assertRaises(TypeError, FromFileStructureParser, 'data/1LJO.pdb', 'pdb')
        assert isinstance(structure, Structure)         

src/p/y/pycogent-HEAD/tests/test_parse/test_structure.py   pycogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.core.entity import Structure
from cogent.parse.structure import FromFilenameStructureParser, FromFileStructureParser
 
__author__ = "Marcin Knight"
    def test_FromFileStructureParser(self):
        structure = FromFileStructureParser(open('data/1LJO.pdb'), 'pdb')
        assert isinstance(structure, Structure)
        self.assertRaises(TypeError, FromFileStructureParser, 'data/1LJO.pdb', 'pdb')
        assert isinstance(structure, Structure)