mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 12:50:38 +08:00
fix: handle empty inputs in patch generation
This commit is contained in:
@ -183,3 +183,9 @@ class TestLoadLargeDiff:
|
|||||||
+ 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