Exemplo n.º 1
0
def given_directory_deleted_remote_branch(tmp_path: Path, directory: str,
                                          test_branch: str) -> None:
    path = tmp_path / directory
    if util.remote_branch_exists(path, test_branch):
        results = util.delete_remote_branch(path, test_branch)
        assert all([r.returncode == 0 for r in results])
    assert not util.remote_branch_exists(path, test_branch)
Exemplo n.º 2
0
def given_cats_remote_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"]
        if util.remote_branch_exists(path, test_branch):
            util.delete_remote_branch(path, test_branch)
        util.create_remote_branch(path, test_branch)
        assert util.remote_branch_exists(path, test_branch)
Exemplo n.º 3
0
def given_directory_has_remote_branch(tmp_path: Path, directory: str,
                                      test_branch: str) -> None:
    assert util.remote_branch_exists(tmp_path / directory, test_branch)
Exemplo n.º 4
0
def then_directory_has_no_remote_branch(tmp_path: Path, directory: str, branch: str) -> None:
    assert not util.remote_branch_exists(tmp_path / directory, branch)