(self, tmp_dir, dvc, remote)
| 16 | assert api.get_url("foo") == expected_url |
| 17 | |
| 18 | def test_open(self, tmp_dir, dvc, remote): |
| 19 | tmp_dir.dvc_gen({"foo": "foo-text", "dir": {"bar": "bar-text"}}) |
| 20 | dvc.push() |
| 21 | |
| 22 | # Remove cache to force download |
| 23 | remove(dvc.cache.local.path) |
| 24 | |
| 25 | with api.open("foo") as fobj: |
| 26 | assert fobj.read() == "foo-text" |
| 27 | |
| 28 | with api.open("dir/bar") as fobj: |
| 29 | assert fobj.read() == "bar-text" |
| 30 | |
| 31 | @pytest.mark.parametrize("clear_cache", [True, False], ids=["cache", "no_cache"]) |
| 32 | @pytest.mark.parametrize( |