def test_readlines(self): buf = BytesIO() mb = MemoryBuffer(self.data) io = IOBuffer(mb) lines = io.readlines() for line in lines: self.assertEqual(line, self._data) buf.write(line) self.assertEqual(buf.getvalue(), self.data)
def test_readlines(self): buf = StringIO() mb = MemoryBuffer(self.data) io = IOBuffer(mb) lines = io.readlines() for line in lines: assert line == self._data buf.write(line) assert buf.getvalue() == self.data