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

Method test_writelines_userlist

Lib/test/test_io/test_textio.py:786–792  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

784 self.assertEqual(buf.getvalue(), b'abcdef')
785
786 def test_writelines_userlist(self):
787 l = UserList(['ab', 'cd', 'ef'])
788 buf = self.BytesIO()
789 txt = self.TextIOWrapper(buf, encoding="utf-8")
790 txt.writelines(l)
791 txt.flush()
792 self.assertEqual(buf.getvalue(), b'abcdef')
793
794 def test_writelines_error(self):
795 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