MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_writelines_userlist

Method test_writelines_userlist

Lib/test/test_io.py:2025–2031  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2023 self.assertEqual(b''.join(writer._write_stack), b'abcdef')
2024
2025 def test_writelines_userlist(self):
2026 l = UserList([b'ab', b'cd', b'ef'])
2027 writer = self.MockRawIO()
2028 bufio = self.tp(writer, 8)
2029 bufio.writelines(l)
2030 bufio.flush()
2031 self.assertEqual(b''.join(writer._write_stack), b'abcdef')
2032
2033 def test_writelines_error(self):
2034 writer = self.MockRawIO()

Callers

nothing calls this directly

Calls 5

UserListClass · 0.90
writelinesMethod · 0.45
flushMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected