GitSCM: detect patch conflicts on apply_patch_git (bug 2030211)#1065
Closed
GitSCM: detect patch conflicts on apply_patch_git (bug 2030211)#1065
Conversation
|
View this pull request in Lando to land it once approved. |
cgsheeh
approved these changes
Apr 8, 2026
Member
cgsheeh
left a comment
There was a problem hiding this comment.
Ideally we would add a test so this doesn't regress again in the future.
Member
Author
“I know”, he said, “it'll be a simple one-line change”, he said. 😆 Ok, test added. I made it parametrised, so it should be relatively easy to add new methods for coverage if we need to. |
c7fc20d to
bf6b0e9
Compare
cgsheeh
approved these changes
Apr 8, 2026
src/lando/main/tests/test_git.py
Outdated
| """).strip(), | ||
| ) | ||
|
|
||
| with pytest.raises(PatchConflict): |
Member
There was a problem hiding this comment.
Nit: could we do with pytest.raises(PatchConflict) as exc_info:, and then we can check appropriate fields on exc_info outside the with (ie did we parse values into the exception correctly).
|
Pull request closed by commit 0ebb8ff |
lando-worker bot
pushed a commit
that referenced
this pull request
Apr 9, 2026
…ehan * GitSCM: detect patch conflicts on apply_patch_git (bug 2030211) * tests: replace _monkeypatch_scm with identical active_mock fixture * tests: add tests for GitSCM.detect_patch_conflict Pull request: #1065
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.