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

Method test_list_command

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

Source from the content-addressed store, hash-verified

2895 os_helper.unlink(tmpname)
2896
2897 def test_list_command(self):
2898 for tar_name in testtarnames:
2899 with support.captured_stdout() as t:
2900 with tarfile.open(tar_name, 'r') as tf:
2901 tf.list(verbose=False)
2902 expected = t.getvalue().encode('ascii', 'backslashreplace')
2903 for opt in '-l', '--list':
2904 out = self.tarfilecmd(opt, tar_name,
2905 PYTHONIOENCODING='ascii')
2906 self.assertEqual(out, expected)
2907
2908 def test_list_command_verbose(self):
2909 for tar_name in testtarnames:

Callers

nothing calls this directly

Calls 6

tarfilecmdMethod · 0.95
openMethod · 0.45
listMethod · 0.45
encodeMethod · 0.45
getvalueMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected