Exemplo n.º 1
0
def _check_for_non_git_dir_path_clashes(repos: List[plug.StudentRepo]) -> None:
    """Raise if any of the student repo paths clash with a non-git
    directory.
    """
    for repo in repos:
        if repo.path.exists() and not util.is_git_repo(repo.path):
            raise exception.RepoBeeException(
                f"name clash with directory that is not a Git repository: "
                f"'{repo.path}'")
Exemplo n.º 2
0
def test_repobee_exception_repr():
    msg = "an exception message"
    expected_repr = "<RepoBeeException(msg='{}')>".format(msg)
    exc = exception.RepoBeeException(msg)

    assert repr(exc) == expected_repr