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

All Samples(6)  |  Call(4)  |  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_parse_pair_counts(self):
        """parse_pair_counts: should work for even number of lines"""
        lines = PC_COUNTS1.split('\n')
        res = parse_pair_counts(lines)
        self.assertEqual(res['Standard'], 1)
 
        lines = PC_COUNTS2.split('\n')
        res = parse_pair_counts(lines)
        self.assertEqual(res['Standard'], 19)
        self.assertEqual(res['WW-tran'], 1)

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_parse_pair_counts(self):
        """parse_pair_counts: should work for even number of lines"""
        lines = PC_COUNTS1.split('\n')
        res = parse_pair_counts(lines)
        self.assertEqual(res['Standard'], 1)
 
        lines = PC_COUNTS2.split('\n')
        res = parse_pair_counts(lines)
        self.assertEqual(res['Standard'], 19)
        self.assertEqual(res['WW-tran'], 1)