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/p/y/pycogent-HEAD/tests/test_parse/test_ebi.py   pycogent(Download)
#!/usr/bin/env python
""" Provides tests for EbiParser and related classes and functions.
"""
 
from cogent.parse.ebi import cc_alternative_products_parser, \
    def test_cc_itemfinder_valid(self):
        """cc_itemfinder: yield each expected block.""" 
        #pprint(list(cc_itemfinder(labeloff(cc_lines))))
        input_with_license = labeloff(cc_lines)
        self.assertEqual(len(list(cc_itemfinder(
            input_with_license))), 9) 
 
        input_without_license = labeloff(cc_lines[:-4])
    def test_cc_itemfinder_raise(self):
        """cc_itemfinder: raise RecordError if license block bad.""" 
        input_with_license_lacking_bottom = labeloff(cc_lines[:-1]) 
        self.assertRaises(FieldError, cc_itemfinder,
            input_with_license_lacking_bottom)

src/c/o/cogent-1.5.3/tests/test_parse/test_ebi.py   cogent(Download)
#!/usr/bin/env python
""" Provides tests for EbiParser and related classes and functions.
"""
 
from cogent.parse.ebi import cc_alternative_products_parser, \
    def test_cc_itemfinder_valid(self):
        """cc_itemfinder: yield each expected block.""" 
        #pprint(list(cc_itemfinder(labeloff(cc_lines))))
        input_with_license = labeloff(cc_lines)
        self.assertEqual(len(list(cc_itemfinder(
            input_with_license))), 9) 
 
        input_without_license = labeloff(cc_lines[:-4])
    def test_cc_itemfinder_raise(self):
        """cc_itemfinder: raise RecordError if license block bad.""" 
        input_with_license_lacking_bottom = labeloff(cc_lines[:-1]) 
        self.assertRaises(FieldError, cc_itemfinder,
            input_with_license_lacking_bottom)