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

Method test_provoke_stream_error

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

Source from the content-addressed store, hash-verified

940 "regular file extraction failed")
941
942 def test_provoke_stream_error(self):
943 tarinfos = self.tar.getmembers()
944 with self.tar.extractfile(tarinfos[0]) as f: # read the first member
945 self.assertRaises(tarfile.StreamError, f.read)
946
947 def test_compare_members(self):
948 tar1 = tarfile.open(tarname, encoding="iso8859-1")

Callers

nothing calls this directly

Calls 3

getmembersMethod · 0.80
extractfileMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected