deps: bump dvc-data to 0.33.0

- Update `test_gc`
This commit is contained in:
David de la Iglesia Castro
2023-01-18 15:17:07 +02:00
committed by Ruslan Kuprieiev
parent 3676f35b7c
commit 5f558d003a
2 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ dependencies = [
"dvc-render==0.0.17",
"dvc-task==0.1.11",
"dvclive>=1.2.2",
"dvc-data==0.32.0",
"dvc-data==0.33.0",
"dvc-http",
"hydra-core>=1.1.0",
"iterative-telemetry==0.0.6",
+14 -5
View File
@@ -218,12 +218,21 @@ def test_gc_cloud_remove_order(tmp_dir, scm, dvc, tmp_path_factory, mocker):
LocalFileSystem, "remove", autospec=True
)
dvc.gc(workspace=True, cloud=True)
assert len(mocked_remove.mock_calls) == 8
# dir (and unpacked dir) should be first 4 checksums removed from
# the remote
for args in mocked_remove.call_args_list[:4]:
assert len(mocked_remove.mock_calls) == 4
# Unpacked dir should be the first removed
for args in mocked_remove.call_args_list[:2]:
checksum = str(args[0][1])
assert checksum.endswith(".dir") or checksum.endswith(".dir.unpacked")
assert checksum.endswith(".dir.unpacked")
# Then, bulk remove should be applied
# First to `.dir`
checksums = mocked_remove.call_args_list[2][0][1]
assert isinstance(checksums, list)
assert all(x.endswith(".dir") for x in checksums)
# And later to individual files
checksums = mocked_remove.call_args_list[3][0][1]
assert isinstance(checksums, list)
assert not any(x.endswith(".dir") for x in checksums)
def test_gc_not_collect_pipeline_tracked_files(tmp_dir, dvc, run_copy):