Skip to content

Commit

Permalink
deps: bump dvc-data to 0.33.0
Browse files Browse the repository at this point in the history
- Update `test_gc`
  • Loading branch information
daavoo authored and efiop committed Jan 18, 2023
1 parent 3676f35 commit 5f558d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
19 changes: 14 additions & 5 deletions tests/func/test_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5f558d0

Please sign in to comment.