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

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_parse/test_record.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for parser support libraries dealing with records.
"""
from cogent.parse.record import FieldError, RecordError, Grouper, \
    DelimitedSplitter, GenericRecord, MappedRecord, \
    def test_setter_empty(self):
        """TypeSetter should set attrs to vals on empty init"""
        d = dummy()
        ident = TypeSetter()
        ident(d, 'x', 'abc')
        self.assertEqual(d.x, 'abc')
        ident(d, 'y', 3)
        self.assertEqual(d.y, 3)
        ident(d, 'x', 2)

src/p/y/pycogent-HEAD/tests/test_parse/test_record.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for parser support libraries dealing with records.
"""
from cogent.parse.record import FieldError, RecordError, Grouper, \
    DelimitedSplitter, GenericRecord, MappedRecord, \
    def test_setter_empty(self):
        """TypeSetter should set attrs to vals on empty init"""
        d = dummy()
        ident = TypeSetter()
        ident(d, 'x', 'abc')
        self.assertEqual(d.x, 'abc')
        ident(d, 'y', 3)
        self.assertEqual(d.y, 3)
        ident(d, 'x', 2)