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

Method test_extractall_pathlike_dir

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

Source from the content-addressed store, hash-verified

773 os_helper.rmtree(DIR)
774
775 def test_extractall_pathlike_dir(self):
776 DIR = os.path.join(TEMPDIR, "extractall")
777 with os_helper.temp_dir(DIR), \
778 tarfile.open(tarname, encoding="iso8859-1") as tar:
779 directories = [t for t in tar if t.isdir()]
780 tar.extractall(os_helper.FakePath(DIR), directories, filter='fully_trusted')
781 for tarinfo in directories:
782 path = os.path.join(DIR, tarinfo.name)
783 self.assertEqual(os.path.getmtime(path), tarinfo.mtime)
784
785 def test_extract_pathlike_dir(self):
786 dirtype = "ustar/dirtype"

Callers

nothing calls this directly

Calls 6

temp_dirMethod · 0.80
joinMethod · 0.45
openMethod · 0.45
isdirMethod · 0.45
extractallMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected