mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
fix: handle empty inputs in patch generation
This commit is contained in:
@ -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')
|
Reference in New Issue
Block a user