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

Method test_extract_dir

Lib/test/test_zipfile/test_core.py:3259–3264  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3257 os.mkdir(TESTFN2)
3258
3259 def test_extract_dir(self):
3260 with zipfile.ZipFile(findfile("zipdir.zip", subdir="archivetestdata")) as zipf:
3261 zipf.extractall(TESTFN2)
3262 self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a")))
3263 self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b")))
3264 self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c")))
3265
3266 def test_bug_6050(self):
3267 # Extraction should succeed if directories already exist

Callers 1

test_bug_6050Method · 0.95

Calls 6

findfileFunction · 0.90
assertTrueMethod · 0.80
extractallMethod · 0.45
isdirMethod · 0.45
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected