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

Method test_create_command

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

Source from the content-addressed store, hash-verified

2924 self.assertEqual(rc, 1)
2925
2926 def test_create_command(self):
2927 files = [support.findfile('tokenize_tests.txt',
2928 subdir='tokenizedata'),
2929 support.findfile('tokenize_tests-no-coding-cookie-'
2930 'and-utf8-bom-sig-only.txt',
2931 subdir='tokenizedata')]
2932 for opt in '-c', '--create':
2933 try:
2934 out = self.tarfilecmd(opt, tmpname, *files)
2935 self.assertEqual(out, b'')
2936 with tarfile.open(tmpname) as tar:
2937 tar.getmembers()
2938 finally:
2939 os_helper.unlink(tmpname)
2940
2941 def test_create_command_verbose(self):
2942 files = [support.findfile('tokenize_tests.txt',

Callers

nothing calls this directly

Calls 5

tarfilecmdMethod · 0.95
getmembersMethod · 0.80
assertEqualMethod · 0.45
openMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected