mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-13 03:15:17 +00:00
fix: handle empty inputs in patch generation
This commit is contained in:
parent
e431979b8b
commit
d4d58babd5
1 changed files with 7 additions and 1 deletions
|
|
@ -182,4 +182,10 @@ class TestLoadLargeDiff:
|
||||||
+ some new content
|
+ some new content
|
||||||
+ another line
|
+ another line
|
||||||
"""
|
"""
|
||||||
assert patch == patch_expected
|
assert patch == patch_expected
|
||||||
|
|
||||||
|
def test_empty_inputs(self):
|
||||||
|
assert load_large_diff("test.py", "", "") == ""
|
||||||
|
assert load_large_diff("test.py", None, None) == ""
|
||||||
|
assert (load_large_diff("test.py", "content\n", "") ==
|
||||||
|
'--- \n+++ \n@@ -1 +1 @@\n-\n+content\n')
|
||||||
Loading…
Reference in a new issue