(tmp_dir, copy_script, dvc)
| 254 | |
| 255 | @pytest.fixture |
| 256 | def run_copy(tmp_dir, copy_script, dvc): # noqa: ARG001 |
| 257 | def run_copy(src, dst, **run_kwargs): |
| 258 | wdir = pathlib.Path(run_kwargs.get("wdir", ".")) |
| 259 | wdir = pathlib.Path("../" * len(wdir.parts)) |
| 260 | script_path = wdir / "copy.py" |
| 261 | |
| 262 | return dvc.run( |
| 263 | cmd=f"python {script_path} {src} {dst}", |
| 264 | outs=[dst], |
| 265 | deps=[src, f"{script_path}"], |
| 266 | **run_kwargs, |
| 267 | ) |
| 268 | |
| 269 | return run_copy |