mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
Do not require gpt-3.5 in GitRepo
This commit is contained in:
parent
9b26eeb9eb
commit
b882d5db4c
2 changed files with 8 additions and 14 deletions
|
@ -8,11 +8,15 @@ import git
|
|||
|
||||
from aider.dump import dump # noqa: F401
|
||||
from aider.io import InputOutput
|
||||
from aider.models import Model
|
||||
from aider.repo import GitRepo
|
||||
from aider.utils import GitTemporaryDirectory
|
||||
|
||||
|
||||
class TestRepo(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.GPT35 = Model("gpt-3.5-turbo", validate_environment=False)
|
||||
|
||||
def test_diffs_empty_repo(self):
|
||||
with GitTemporaryDirectory():
|
||||
repo = git.Repo()
|
||||
|
@ -104,7 +108,7 @@ class TestRepo(unittest.TestCase):
|
|||
def test_get_commit_message(self, mock_send):
|
||||
mock_send.return_value = "a good commit message"
|
||||
|
||||
repo = GitRepo(InputOutput(), None, None)
|
||||
repo = GitRepo(InputOutput(), None, None, models=[self.GPT35])
|
||||
# Call the get_commit_message method with dummy diff and context
|
||||
result = repo.get_commit_message("dummy diff", "dummy context")
|
||||
|
||||
|
@ -115,7 +119,7 @@ class TestRepo(unittest.TestCase):
|
|||
def test_get_commit_message_strip_quotes(self, mock_send):
|
||||
mock_send.return_value = '"a good commit message"'
|
||||
|
||||
repo = GitRepo(InputOutput(), None, None)
|
||||
repo = GitRepo(InputOutput(), None, None, models=[self.GPT35])
|
||||
# Call the get_commit_message method with dummy diff and context
|
||||
result = repo.get_commit_message("dummy diff", "dummy context")
|
||||
|
||||
|
@ -126,7 +130,7 @@ class TestRepo(unittest.TestCase):
|
|||
def test_get_commit_message_no_strip_unmatched_quotes(self, mock_send):
|
||||
mock_send.return_value = 'a good "commit message"'
|
||||
|
||||
repo = GitRepo(InputOutput(), None, None)
|
||||
repo = GitRepo(InputOutput(), None, None, models=[self.GPT35])
|
||||
# Call the get_commit_message method with dummy diff and context
|
||||
result = repo.get_commit_message("dummy diff", "dummy context")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue