import pytest from pathlib import Path @pytest.fixture def support_data_path() -> Path: path = Path(__file__).parent.parent.joinpath("_support_data") return path @pytest.fixture def cloner_dir_struct(tmp_path: Path) -> Path: tmp_path.joinpath("config").mkdir() tmp_path.joinpath("cache").mkdir() tmp_path.joinpath("repos").mkdir() return tmp_path @pytest.fixture def cloner_dir_with_config(cloner_dir_struct: Path) -> Path: cfg_file = cloner_dir_struct.joinpath("config", "cloner.cfg") cfg_file.touch() cfg_file.write_text("# cloner.cfg" "cloner_repo_url=https://git.sw3.cz/kamikaze/test-repo-base.git" "cloner_project_name=test-repo" ) return cloner_dir_struct