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

Method test_fileobj_iter

Lib/test/test_tarfile.py:157–165  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

155 "fileobj.readlines() failed")
156
157 def test_fileobj_iter(self):
158 self.tar.extract("ustar/regtype", TEMPDIR, filter='data')
159 tarinfo = self.tar.getmember("ustar/regtype")
160 with open(os.path.join(TEMPDIR, "ustar/regtype"), "r") as fobj1:
161 lines1 = fobj1.readlines()
162 with self.tar.extractfile(tarinfo) as fobj2:
163 lines2 = list(io.TextIOWrapper(fobj2))
164 self.assertEqual(lines1, lines2,
165 "fileobj.__iter__() failed")
166
167 def test_fileobj_seek(self):
168 self.tar.extract("ustar/regtype", TEMPDIR,

Callers

nothing calls this directly

Calls 8

listClass · 0.85
getmemberMethod · 0.80
extractfileMethod · 0.80
openFunction · 0.50
extractMethod · 0.45
joinMethod · 0.45
readlinesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected