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

Method test_writelines_userlist

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

Source from the content-addressed store, hash-verified

3444 self.assertEqual(buf.getvalue(), b'abcdef')
3445
3446 def test_writelines_userlist(self):
3447 l = UserList(['ab', 'cd', 'ef'])
3448 buf = self.BytesIO()
3449 txt = self.TextIOWrapper(buf, encoding="utf-8")
3450 txt.writelines(l)
3451 txt.flush()
3452 self.assertEqual(buf.getvalue(), b'abcdef')
3453
3454 def test_writelines_error(self):
3455 txt = self.TextIOWrapper(self.BytesIO(), encoding="utf-8")

Callers

nothing calls this directly

Calls 5

flushMethod · 0.95
getvalueMethod · 0.95
UserListClass · 0.90
writelinesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected