Did I find the right examples for you? yes no

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

src/c/o/cogent-1.5.3/tests/test_core/test_info.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for Info class and associated objects (DbRef, DbRefs, etc.).
"""
from cogent.util.unit_test import TestCase, main
from cogent.core.info import DbRef, DbRefs, Info, _make_list
    def test_init_data(self):
        """DbRefs init with data should produce expected results"""
        d = DbRefs({'GenBank':'ab', 'GO':(3,44), 'PDB':['asdf','ghjk']})
        self.assertEqual(d,{'GenBank':['ab'],'GO':[3,44],'PDB':['asdf','ghjk']})
        d.GenBank = 'xyz'

src/p/y/pycogent-HEAD/tests/test_core/test_info.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for Info class and associated objects (DbRef, DbRefs, etc.).
"""
from cogent.util.unit_test import TestCase, main
from cogent.core.info import DbRef, DbRefs, Info, _make_list
    def test_init_data(self):
        """DbRefs init with data should produce expected results"""
        d = DbRefs({'GenBank':'ab', 'GO':(3,44), 'PDB':['asdf','ghjk']})
        self.assertEqual(d,{'GenBank':['ab'],'GO':[3,44],'PDB':['asdf','ghjk']})
        d.GenBank = 'xyz'