(*members: str)
| 580 | |
| 581 | |
| 582 | def _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 | |
| 593 | def _tar_symlink_bytes(*, name: str, target: str) -> bytes: |
no test coverage detected