def test_longer_than_header_row_raise_ValueError(self): with self.assertRaises(ValueError): list( m.pad( records_from_text(u'''\ header1,header2 value1,value2,value3 ''')))
def test_short_records_are_padded_with_empty_strings(self): self.assertListEqual( records_from_text(u'''\ header1,header2 value1, '''), list( m.pad( records_from_text(u'''\ header1,header2 value1 '''))))
def test_well_formed_input_remains_as_is(self): self.assertListEqual( records_from_text(u'''\ header1,header2 value1,value2 '''), list( m.pad( records_from_text(u'''\ header1,header2 value1,value2 '''))))