mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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:
parent
1a8e5742cd
commit
45c2ef48ca
3 changed files with 173 additions and 139 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue