def test_write_section(self): |
tempdir = temppath.ensure('dirwriter', dir=True) |
dw = self.get_filled_writer(DirWriter, tempdir) |
fpaths = tempdir.listdir('*.txt') |
assert len(fpaths) == 2 |
assert sorted([f.basename for f in fpaths]) == ['bar.txt', 'foo.txt'] |
-> assert _nl(tempdir.join('foo.txt').read()) == 'foo data\n' |
assert _nl(tempdir.join('bar.txt').read()) == 'bar data\n' |