-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose git errors instead of printing a generic error message #9845
base: main
Are you sure you want to change the base?
Changes from all commits
7c38bf3
3460e8a
b68e177
3c76d5c
627cab0
098b40c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -435,3 +435,13 @@ | |
"ssh://github.com/python-poetry/test-fixture-vcs-repository.git", | ||
"ssh://github.com/python-poetry/test-fixture-vcs-repository.git", | ||
] | ||
|
||
|
||
def test_git_error_is_exposed_for_non_existent_repo() -> None: | ||
source_url = "https://github.com/python-poetry/test-fixture-vcs-repo.git" | ||
branch = uuid.uuid4().hex | ||
|
||
with pytest.raises(PoetryConsoleError) as e: | ||
Git.clone(url=source_url, branch=branch) | ||
|
||
assert "remote: Repository not found." in str(e.value) | ||
Check failure on line 447 in tests/integration/test_utils_vcs_git.py Cirrus CI / Tests / FreeBSD (Python 3.9) / pytesttests/integration/test_utils_vcs_git.py#L447
Raw output
Check failure on line 447 in tests/integration/test_utils_vcs_git.py Cirrus CI / Tests / FreeBSD (Python 3.10) / pytesttests/integration/test_utils_vcs_git.py#L447
Raw output
Check failure on line 447 in tests/integration/test_utils_vcs_git.py Cirrus CI / Tests / FreeBSD (Python 3.11) / pytesttests/integration/test_utils_vcs_git.py#L447
Raw output
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS aarch64 (Python 3.10) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS aarch64 (Python 3.11) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS aarch64 (Python 3.12) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS aarch64 (Python 3.13) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS aarch64 (Python 3.9) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS x86_64 (Python 3.10) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS x86_64 (Python 3.11) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS x86_64 (Python 3.12) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS x86_64 (Python 3.13) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / macOS x86_64 (Python 3.9) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / Ubuntu (Python 3.10) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / Ubuntu (Python 3.11) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / Ubuntu (Python 3.12) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / Ubuntu (Python 3.13) / pytest
Check failure on line 447 in tests/integration/test_utils_vcs_git.py GitHub Actions / Ubuntu (Python 3.9) / pytest
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest the git error be surfaced via
logger.debug
instead. The proposed change is too noisy.