mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
------------------------------------------------------------
Traceback (most recent call last):
File "/Users/efiop/git/dvc/dvc/remote/local/__init__.py", line 280, in upload
no_progress_bar=no_progress_bar,
File "/Users/efiop/git/dvc/dvc/utils/__init__.py", line 129, in copyfile
System.reflink(src, dest)
File "/Users/efiop/git/dvc/dvc/system.py", line 125, in reflink
ret = System._reflink_darwin(source, link_name)
File "/Users/efiop/git/dvc/dvc/system.py", line 89, in _reflink_darwin
ctypes.c_char_p(src.encode("utf-8")),
AttributeError: 'PosixPathInfo' object has no attribute 'encode'
------------------------------------------------------------
Signed-off-by: Ruslan Kuprieiev <[email protected]>
17 lines
419 B
Python
17 lines
419 B
Python
import os
|
|
import pytest
|
|
|
|
from dvc.system import System
|
|
|
|
|
|
@pytest.mark.skipif(os.name != "nt", reason="Windows specific")
|
|
def test_getdirinfo(tmp_path):
|
|
# simulate someone holding an exclussive access
|
|
locked = str(tmp_path / "locked")
|
|
fd = os.open(locked, os.O_WRONLY | os.O_CREAT | os.O_EXCL)
|
|
try:
|
|
# should not raise WinError
|
|
System._getdirinfo(locked)
|
|
finally:
|
|
os.close(fd)
|