MCPcopy
hub / github.com/pex-tool/pex / write_zipapp

Function write_zipapp

tests/test_pex_builder.py:553–557  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

551
552 @contextmanager
553 def write_zipapp(path):
554 # type: (str) -> Iterator[ZipFile]
555 with open_zip(path, "w") as zip_file:
556 yield zip_file
557 zip_file.writestr("__main__.py", "print('BOOTED')")
558
559 # N.B.: This test creates very large files in /tmp; so to relieve possible memory pressure in
560 # tmpfs-based /tmp filesystems, we unlink files as soon as we don't need them instead of waiting

Callers 1

test_checkFunction · 0.85

Calls 1

open_zipFunction · 0.90

Tested by

no test coverage detected