def test_git_extract_repository_url(git_repo): """Make sure that the git repository url is extracted properly.""" expected_repository_url = "[email protected]:test-repo-url.git" assert git.extract_repository_url(cwd=git_repo) == expected_repository_url
def test_git_extract_repository_url_error(git_repo_empty): """On error, the repository url tag should not be extracted, and should internally raise the error.""" with pytest.raises(ValueError): git.extract_repository_url(cwd=git_repo_empty)