Skip to content

Commit f7e0b57

Browse files
committed
tests: add download_dir
1 parent 164ded6 commit f7e0b57

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/remote/test_remote_dir.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import pytest
3+
import os
34

45
from dvc.remote.s3 import RemoteS3
56

@@ -132,3 +133,12 @@ def test_isfile(remote):
132133

133134
for expected, path in test_cases:
134135
assert remote.isfile(remote.path_info / path) == expected
136+
137+
138+
@pytest.mark.parametrize("remote", remotes, indirect=True)
139+
def test_download_dir(remote, tmpdir):
140+
path = os.fspath(tmpdir / "data")
141+
to_info = os.PathInfo(path)
142+
remote.download(remote.path_info / "data", to_info)
143+
assert os.path.isdir(path)
144+
# check the list of files

0 commit comments

Comments
 (0)