MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_extract_all

Method test_extract_all

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

Source from the content-addressed store, hash-verified

1664 self._test_extract_with_target(FakePath(extdir))
1665
1666 def test_extract_all(self):
1667 with temp_cwd():
1668 self.make_test_file()
1669 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1670 zipfp.extractall()
1671 for fpath, fdata in SMALL_TEST_DATA:
1672 outfile = os.path.join(os.getcwd(), fpath)
1673
1674 with open(outfile, "rb") as f:
1675 self.assertEqual(fdata.encode(), f.read())
1676
1677 unlink(outfile)
1678
1679 def _test_extract_all_with_target(self, target):
1680 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