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

Method test_fileobj_regular_file

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

Source from the content-addressed store, hash-verified

128class UstarReadTest(ReadTest, unittest.TestCase):
129
130 def test_fileobj_regular_file(self):
131 tarinfo = self.tar.getmember("ustar/regtype")
132 with self.tar.extractfile(tarinfo) as fobj:
133 data = fobj.read()
134 self.assertEqual(len(data), tarinfo.size,
135 "regular file extraction failed")
136 self.assertEqual(sha256sum(data), sha256_regtype,
137 "regular file extraction failed")
138
139 def test_fileobj_readlines(self):
140 self.tar.extract("ustar/regtype", TEMPDIR, filter='data')

Callers

nothing calls this directly

Calls 6

lenFunction · 0.85
sha256sumFunction · 0.85
getmemberMethod · 0.80
extractfileMethod · 0.80
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected