From 4e53f17948623ac527047da97c9c484ee8bbcb14 Mon Sep 17 00:00:00 2001 From: Vera <9991536+verasativa@users.noreply.github.com> Date: Thu, 5 Dec 2019 17:41:17 -0300 Subject: [PATCH] Update tests/unit/remote/test_remote_dir.py Co-Authored-By: Ruslan Kuprieiev --- tests/unit/remote/test_remote_dir.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/unit/remote/test_remote_dir.py b/tests/unit/remote/test_remote_dir.py index 9e740a9684..f1e776760e 100644 --- a/tests/unit/remote/test_remote_dir.py +++ b/tests/unit/remote/test_remote_dir.py @@ -141,4 +141,12 @@ def test_download_dir(remote, tmpdir): to_info = os.PathInfo(path) remote.download(remote.path_info / "data", to_info) assert os.path.isdir(path) - # check the list of files + data_dir = tmpdir / "data" + assert len(list(walk_files(path, None))) == 7 + assert (data_dir / "alice").read_text(encoding="utf-8") == "alice" + assert (data_dir / "alpha").read_text(encoding="utf-8") == "alpha" + assert (data_dir / "subdir-file.txt").read_text(encoding="utf-8") == "subdir" + assert (data_dir / "subdir" / "1").read_text(encoding="utf-8") == "1" + assert (data_dir / "subdir" / "2").read_text(encoding="utf-8") == "2" + assert (data_dir / "subdir" / "3").read_text(encoding="utf-8") == "3" + assert (data_dir / "subdir" / "empty_file").read_text(encoding="utf-8") == ""