def given_directory_created_local_branch(tmp_path: Path, directory: str, branch: str) -> None: path = tmp_path / directory util.create_local_branch(path, branch) assert util.local_branch_exists(tmp_path / directory, branch)
def given_directory_deleted_local_branch(tmp_path: Path, directory: str, branch: str) -> None: path = tmp_path / directory if util.local_branch_exists(path, branch): util.delete_local_branch(path, branch, check=True) assert not util.local_branch_exists(path, branch)
def then_directory_has_local_branch(tmp_path: Path, directory: str, branch: str) -> None: path = tmp_path / directory assert util.local_branch_exists(path, branch)
def given_directory_has_no_local_branch(tmp_path: Path, directory: str, test_branch: str) -> None: assert not util.local_branch_exists(tmp_path / directory, test_branch)
def given_cats_local_branch(tmp_path: Path, scenario_info: ScenarioInfo, test_branch: str) -> None: scenario_info.example = "cats" for name, repo in CATS_REPOS_DEFAULT.items(): path = tmp_path / repo["path"] util.create_local_branch(path, test_branch) assert util.local_branch_exists(path, test_branch)