mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
Update test class name and adjust patch extra lines configuration
- Renamed test class to `TestExtendedPatchMoreLines` in `test_extend_patch.py` - Imported `pr_generate_extended_diff` in `test_extend_patch.py` - Updated `patch_extra_lines_before` to 4 in `additional_configurations.md`
This commit is contained in:
@ -66,7 +66,7 @@ By default, around any change in your PR, git patch provides three lines of cont
|
|||||||
For the `review`, `describe`, `ask` and `add_docs` tools, if the token budget allows, PR-Agent tries to increase the number of lines of context, via the parameter:
|
For the `review`, `describe`, `ask` and `add_docs` tools, if the token budget allows, PR-Agent tries to increase the number of lines of context, via the parameter:
|
||||||
```
|
```
|
||||||
[config]
|
[config]
|
||||||
patch_extra_lines_before=6
|
patch_extra_lines_before=4
|
||||||
patch_extra_lines_after=2
|
patch_extra_lines_after=2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from pr_agent.algo.git_patch_processing import extend_patch
|
from pr_agent.algo.git_patch_processing import extend_patch
|
||||||
|
from pr_agent.algo.pr_processing import pr_generate_extended_diff
|
||||||
from pr_agent.algo.token_handler import TokenHandler
|
from pr_agent.algo.token_handler import TokenHandler
|
||||||
|
|
||||||
|
|
||||||
@ -60,7 +61,7 @@ class TestExtendPatch:
|
|||||||
assert actual_output == expected_output
|
assert actual_output == expected_output
|
||||||
|
|
||||||
|
|
||||||
class PRProcessingTest:
|
class TestExtendedPatchMoreLines:
|
||||||
class File:
|
class File:
|
||||||
def __init__(self, base_file, patch, filename):
|
def __init__(self, base_file, patch, filename):
|
||||||
self.base_file = base_file
|
self.base_file = base_file
|
||||||
|
Reference in New Issue
Block a user