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

Method test_create_command_compressed

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

Source from the content-addressed store, hash-verified

2976 os_helper.unlink(tar_name)
2977
2978 def test_create_command_compressed(self):
2979 files = [support.findfile('tokenize_tests.txt',
2980 subdir='tokenizedata'),
2981 support.findfile('tokenize_tests-no-coding-cookie-'
2982 'and-utf8-bom-sig-only.txt',
2983 subdir='tokenizedata')]
2984 for filetype in (GzipTest, Bz2Test, LzmaTest, ZstdTest):
2985 if not filetype.open:
2986 continue
2987 try:
2988 tar_name = tmpname + '.' + filetype.suffix
2989 out = self.tarfilecmd('-c', tar_name, *files)
2990 with filetype.taropen(tar_name) as tar:
2991 tar.getmembers()
2992 finally:
2993 os_helper.unlink(tar_name)
2994
2995 def test_extract_command(self):
2996 self.make_simple_tarfile(tmpname)

Callers

nothing calls this directly

Calls 4

tarfilecmdMethod · 0.95
taropenMethod · 0.80
getmembersMethod · 0.80
unlinkMethod · 0.45

Tested by

no test coverage detected