def test_repo_from_invalid_path(): with tempdir(): try: repo, remote = repo_from_path(".") assert False except UserFeedback as e: assert "no git repository was found at '.'" in str(e)
def test_repo_from_path(): repo, remote = repo_from_path(PATH_TO_LOCAL_REPO) assert ".git" in repo.path