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

Method testWritelinesUserList

Lib/test/test_fileio.py:144–150  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142 self.assertEqual(buf, b'123456')
143
144 def testWritelinesUserList(self):
145 l = UserList([b'123', b'456'])
146 self.f.writelines(l)
147 self.f.close()
148 self.f = self.FileIO(TESTFN, 'rb')
149 buf = self.f.read()
150 self.assertEqual(buf, b'123456')
151
152 def testWritelinesError(self):
153 self.assertRaises(TypeError, self.f.writelines, [1, 2, 3])

Callers

nothing calls this directly

Calls 5

UserListClass · 0.90
writelinesMethod · 0.45
closeMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected