| 69 | pytest.skip() |
| 70 | |
| 71 | def test_import_empty_dir(self, tmp_dir, dvc, workspace, is_object_storage): |
| 72 | # prefix based storage services (e.g s3) doesn't have the real concept |
| 73 | # of directories. So instead we create an empty file that ends with a |
| 74 | # trailing slash in order to actually support this operation |
| 75 | if is_object_storage: |
| 76 | contents: Union[str, dict[str, str]] = "" |
| 77 | else: |
| 78 | contents = {} |
| 79 | |
| 80 | workspace.gen({"empty_dir/": contents}) |
| 81 | |
| 82 | dvc.imp_url("remote://workspace/empty_dir/") |
| 83 | |
| 84 | empty_dir = tmp_dir / "empty_dir" |
| 85 | assert empty_dir.is_dir() |
| 86 | assert tuple(empty_dir.iterdir()) == () |
| 87 | |
| 88 | |
| 89 | class TestImportURLVersionAware: |