Example #1
0
 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)
Example #2
0
 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
Example #3
0
 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)