MCPcopy Create free account
hub / github.com/openai/openai-agents-python / _tar_bytes

Function _tar_bytes

tests/sandbox/test_docker.py:582–590  ·  view source on GitHub ↗
(*members: str)

Source from the content-addressed store, hash-verified

580
581
582def _tar_bytes(*members: str) -> bytes:
583 buf = io.BytesIO()
584 with tarfile.open(fileobj=buf, mode="w") as tar:
585 for name in members:
586 payload = b"pwned"
587 info = tarfile.TarInfo(name=name)
588 info.size = len(payload)
589 tar.addfile(info, io.BytesIO(payload))
590 return buf.getvalue()
591
592
593def _tar_symlink_bytes(*, name: str, target: str) -> bytes:

Calls 1

openMethod · 0.80

Tested by

no test coverage detected