MCPcopy Index your code
hub / github.com/python/cpython / test_writelines

Method test_writelines

Lib/test/test_io/test_bufferedio.py:800–806  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

798 self.assertEqual(b"abc", writer._write_stack[0])
799
800 def test_writelines(self):
801 l = [b'ab', b'cd', b'ef']
802 writer = self.MockRawIO()
803 bufio = self.tp(writer, 8)
804 bufio.writelines(l)
805 bufio.flush()
806 self.assertEqual(b''.join(writer._write_stack), b'abcdef')
807
808 def test_writelines_userlist(self):
809 l = UserList([b'ab', b'cd', b'ef'])

Callers

nothing calls this directly

Calls 4

writelinesMethod · 0.45
flushMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected