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

All Samples(334)  |  Call(332)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_rnaview.py   cogent(Download)
 
from cogent.util.unit_test import TestCase, main
from cogent.parse.rnaview import is_roman_numeral, is_edge, is_orientation,\
    parse_annotation, parse_uncommon_residues, parse_base_pairs,\
    parse_base_multiplets, parse_pair_counts, MinimalRnaviewParser,\
    def test_init(self):
        """Base __init__: should initialize on standard data"""
        b = Base('A','30','G')
        self.assertEqual(b.ChainId, 'A')
        self.assertEqual(b.ResId, '30')
        self.assertRaises(RnaViewObjectError, Base, None, '', 'C')
        #Can pass RnaViewSeqPos (str)
        b = Base('C','12','A','10')
        self.assertEqual(b.RnaViewSeqPos, '10')
 
    def test_str(self):
        """Base __str__: should return correct string"""
        b = Base('A','30','G')
    def test_eq(self):
        """Base ==: functions as expected """
        # Define a standard to compare others
        b = Base('A','30','G')
        # Identical to b

src/p/y/pycogent-HEAD/tests/test_parse/test_rnaview.py   pycogent(Download)
 
from cogent.util.unit_test import TestCase, main
from cogent.parse.rnaview import is_roman_numeral, is_edge, is_orientation,\
    parse_annotation, parse_uncommon_residues, parse_base_pairs,\
    parse_base_multiplets, parse_pair_counts, MinimalRnaviewParser,\
    def test_init(self):
        """Base __init__: should initialize on standard data"""
        b = Base('A','30','G')
        self.assertEqual(b.ChainId, 'A')
        self.assertEqual(b.ResId, '30')
        self.assertRaises(RnaViewObjectError, Base, None, '', 'C')
        #Can pass RnaViewSeqPos (str)
        b = Base('C','12','A','10')
        self.assertEqual(b.RnaViewSeqPos, '10')
 
    def test_str(self):
        """Base __str__: should return correct string"""
        b = Base('A','30','G')
    def test_eq(self):
        """Base ==: functions as expected """
        # Define a standard to compare others
        b = Base('A','30','G')
        # Identical to b