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

Method huge_zipfile

Lib/test/test_zipfile/_path/test_path.py:319–326  ·  view source on GitHub ↗

Create a read-only zipfile with a huge number of entries.

(self)

Source from the content-addressed store, hash-verified

317 HUGE_ZIPFILE_NUM_ENTRIES = 2**13
318
319 def huge_zipfile(self):
320 """Create a read-only zipfile with a huge number of entries."""
321 strm = io.BytesIO()
322 zf = zipfile.ZipFile(strm, "w")
323 for entry in map(str, range(self.HUGE_ZIPFILE_NUM_ENTRIES)):
324 zf.writestr(entry, entry)
325 zf.mode = 'r'
326 return zf
327
328 def test_joinpath_constant_time(self):
329 """

Callers 1

Calls 1

writestrMethod · 0.95

Tested by

no test coverage detected