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

Method test_fileobj_regular_file

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

Source from the content-addressed store, hash-verified

931 break
932
933 def test_fileobj_regular_file(self):
934 tarinfo = self.tar.next() # get "regtype" (can't use getmember)
935 with self.tar.extractfile(tarinfo) as fobj:
936 data = fobj.read()
937 self.assertEqual(len(data), tarinfo.size,
938 "regular file extraction failed")
939 self.assertEqual(sha256sum(data), sha256_regtype,
940 "regular file extraction failed")
941
942 def test_provoke_stream_error(self):
943 tarinfos = self.tar.getmembers()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected