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

Method huge_zipfile

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

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

(self)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

writestrMethod · 0.95

Tested by

no test coverage detected