(self, tmp_dir, dvc, remote, monkeypatch)
| 116 | |
| 117 | @pytest.mark.xfail(raises=NotImplementedError, strict=False) |
| 118 | def test_pull_00_prefix(self, tmp_dir, dvc, remote, monkeypatch): |
| 119 | # Related: https://github.com/treeverse/dvc/issues/6089 |
| 120 | |
| 121 | fs_type = type(dvc.cloud.get_remote_odb("upstream").fs) |
| 122 | monkeypatch.setattr(fs_type, "_ALWAYS_TRAVERSE", True, raising=False) |
| 123 | monkeypatch.setattr(fs_type, "LIST_OBJECT_PAGE_SIZE", 256, raising=False) |
| 124 | |
| 125 | # foo's md5 checksum is 00411460f7c92d2124a67ea0f4cb5f85 |
| 126 | # bar's md5 checksum is 0000000018e6137ac2caab16074784a6 |
| 127 | foo_out = tmp_dir.dvc_gen("foo", "363")[0].outs[0] |
| 128 | bar_out = tmp_dir.dvc_gen("bar", "jk8ssl")[0].outs[0] |
| 129 | expected_hashes = {foo_out.hash_info, bar_out.hash_info} |
| 130 | |
| 131 | dvc.push() |
| 132 | status = dvc.cloud.status(expected_hashes) |
| 133 | _check_status(status, ok=expected_hashes) |
| 134 | |
| 135 | dvc.cache.local.clear() |
| 136 | remove(tmp_dir / "foo") |
| 137 | remove(tmp_dir / "bar") |
| 138 | |
| 139 | stats = dvc.pull() |
| 140 | assert stats == { |
| 141 | "added": ["bar", "foo"], |
| 142 | "deleted": [], |
| 143 | "modified": [], |
| 144 | "stats": {"fetched": 2, "added": 2, "deleted": 0, "modified": 0}, |
| 145 | } |
| 146 | |
| 147 | @pytest.mark.xfail(raises=NotImplementedError, strict=False) |
| 148 | def test_pull_no_00_prefix(self, tmp_dir, dvc, remote, monkeypatch): |
nothing calls this directly
no test coverage detected