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

Method test_extract_all

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

Source from the content-addressed store, hash-verified

1681 self._test_extract_with_target(FakePath(extdir))
1682
1683 def test_extract_all(self):
1684 with temp_cwd():
1685 self.make_test_file()
1686 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1687 zipfp.extractall()
1688 for fpath, fdata in SMALL_TEST_DATA:
1689 outfile = os.path.join(os.getcwd(), fpath)
1690
1691 with open(outfile, "rb") as f:
1692 self.assertEqual(fdata.encode(), f.read())
1693
1694 unlink(outfile)
1695
1696 def _test_extract_all_with_target(self, target):
1697 self.make_test_file()

Callers

nothing calls this directly

Calls 9

make_test_fileMethod · 0.95
temp_cwdFunction · 0.90
unlinkFunction · 0.90
openFunction · 0.50
extractallMethod · 0.45
joinMethod · 0.45
assertEqualMethod · 0.45
encodeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected