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

Method _create_testtar

Lib/test/test_tarfile.py:2560–2566  ·  view source on GitHub ↗
(self, mode="w:")

Source from the content-addressed store, hash-verified

2558 os_helper.unlink(self.tarname)
2559
2560 def _create_testtar(self, mode="w:"):
2561 with tarfile.open(tarname, encoding="iso8859-1") as src:
2562 t = src.getmember("ustar/regtype")
2563 t.name = "foo"
2564 with src.extractfile(t) as f:
2565 with tarfile.open(self.tarname, mode) as tar:
2566 tar.addfile(t, f)
2567
2568 def test_append_compressed(self):
2569 self._create_testtar("w:" + self.suffix)

Callers 3

test_fileobjMethod · 0.80
test_existingMethod · 0.80

Calls 4

getmemberMethod · 0.80
extractfileMethod · 0.80
addfileMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected