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

Method _add_testfile

Lib/test/test_tarfile.py:2575–2577  ·  view source on GitHub ↗
(self, fileobj=None)

Source from the content-addressed store, hash-verified

2573 test_append_compressed = None
2574
2575 def _add_testfile(self, fileobj=None):
2576 with tarfile.open(self.tarname, "a", fileobj=fileobj) as tar:
2577 tar.addfile(tarfile.TarInfo("bar"))
2578
2579 def _test(self, names=["bar"], fileobj=None):
2580 with tarfile.open(self.tarname, fileobj=fileobj) as tar:

Callers 5

test_non_existingMethod · 0.95
test_emptyMethod · 0.95
test_empty_fileobjMethod · 0.95
test_fileobjMethod · 0.95
test_existingMethod · 0.95

Calls 2

addfileMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected