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

Method make_simple_tarfile

Lib/test/test_tarfile.py:2835–2844  ·  view source on GitHub ↗
(self, tar_name)

Source from the content-addressed store, hash-verified

2833 return script_helper.assert_python_failure('-m', 'tarfile', *args)
2834
2835 def make_simple_tarfile(self, tar_name):
2836 files = [support.findfile('tokenize_tests.txt',
2837 subdir='tokenizedata'),
2838 support.findfile('tokenize_tests-no-coding-cookie-'
2839 'and-utf8-bom-sig-only.txt',
2840 subdir='tokenizedata')]
2841 self.addCleanup(os_helper.unlink, tar_name)
2842 with tarfile.open(tar_name, 'w') as tf:
2843 for tardata in files:
2844 tf.add(tardata, arcname=os.path.basename(tardata))
2845
2846 def make_evil_tarfile(self, tar_name):
2847 self.addCleanup(os_helper.unlink, tar_name)

Calls 4

addCleanupMethod · 0.80
openMethod · 0.45
addMethod · 0.45
basenameMethod · 0.45

Tested by

no test coverage detected