GH-130614: pathlib ABCs: parametrize test suite for path copying (#131168)

Test copying from `Path` and `ReadableZipPath` (types of `_ReadablePath`)
to `Path` and `WritableZipPath` (types of `_WritablePath`).
This commit is contained in:
Barney Gale 2025-03-13 21:56:59 +00:00 committed by GitHub
parent 1a8e5742cd
commit 45c2ef48ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 173 additions and 139 deletions

View file

@ -248,7 +248,7 @@ def copy_file(source, target, follow_symlinks=True, preserve_metadata=False):
"""
info = source.info
if not follow_symlinks and info.is_symlink():
target.symlink_to(source.readlink(), info.is_dir())
target.symlink_to(str(source.readlink()), info.is_dir())
if preserve_metadata:
target._write_info(info, follow_symlinks=False)
elif info.is_dir():