tests: add download_dir

This commit is contained in:
Vera Sativa
2019-12-05 16:51:24 -03:00
parent 164ded6453
commit f7e0b575bd
+10
View File
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import pytest
import os
from dvc.remote.s3 import RemoteS3
@@ -132,3 +133,12 @@ def test_isfile(remote):
for expected, path in test_cases:
assert remote.isfile(remote.path_info / path) == expected
@pytest.mark.parametrize("remote", remotes, indirect=True)
def test_download_dir(remote, tmpdir):
path = os.fspath(tmpdir / "data")
to_info = os.PathInfo(path)
remote.download(remote.path_info / "data", to_info)
assert os.path.isdir(path)
# check the list of files