MCPcopy Index your code
hub / github.com/python/cpython / test_provoke_stream_error

Method test_provoke_stream_error

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

Source from the content-addressed store, hash-verified

938 "regular file extraction failed")
939
940 def test_provoke_stream_error(self):
941 tarinfos = self.tar.getmembers()
942 with self.tar.extractfile(tarinfos[0]) as f: # read the first member
943 self.assertRaises(tarfile.StreamError, f.read)
944
945 def test_compare_members(self):
946 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