Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
test: add test to test put_directory when there are files in sub dir
Browse files Browse the repository at this point in the history
  • Loading branch information
milk531 committed Jul 9, 2023
1 parent cd82d09 commit 1f7b47c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,14 @@ def test_put_directory(self, gcs_bucket, tmp_path, to_path, ignore):
(local_path / "cab.txt").write_text("cab")
(local_path / "some_dir").mkdir()

(local_path / "some_dir/text_file_in_dir.txt").write_text("hello")
(local_path / "some_dir/html_file_in_dir.html").write_text("<html>hello</html>")

expected = 2
if ignore:
ignore_file = tmp_path / "ignore.txt"
ignore_file.write_text("*.html")
expected -= 1
expected -= 2
else:
ignore_file = None

Expand Down

0 comments on commit 1f7b47c

Please sign in to comment.