mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 21:34:59 +00:00
style: Format strings with double quotes in test_models.py
This commit is contained in:
parent
9094af565f
commit
016aa87e34
1 changed files with 12 additions and 12 deletions
|
@ -208,8 +208,8 @@ class TestModels(unittest.TestCase):
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
@patch('aider.models.litellm.completion')
|
||||
@patch.object(Model, 'token_count')
|
||||
@patch("aider.models.litellm.completion")
|
||||
@patch.object(Model, "token_count")
|
||||
def test_ollama_num_ctx_set_when_missing(self, mock_token_count, mock_completion):
|
||||
mock_token_count.return_value = 1000
|
||||
|
||||
|
@ -230,7 +230,7 @@ class TestModels(unittest.TestCase):
|
|||
tool_choice=None,
|
||||
)
|
||||
|
||||
@patch('aider.models.litellm.completion')
|
||||
@patch("aider.models.litellm.completion")
|
||||
def test_ollama_uses_existing_num_ctx(self, mock_completion):
|
||||
model = Model("ollama/llama3")
|
||||
model.extra_params = {"num_ctx": 4096}
|
||||
|
@ -249,7 +249,7 @@ class TestModels(unittest.TestCase):
|
|||
tool_choice=None,
|
||||
)
|
||||
|
||||
@patch('aider.models.litellm.completion')
|
||||
@patch("aider.models.litellm.completion")
|
||||
def test_non_ollama_no_num_ctx(self, mock_completion):
|
||||
model = Model("gpt-4")
|
||||
messages = [{"role": "user", "content": "Hello"}]
|
||||
|
@ -265,7 +265,7 @@ class TestModels(unittest.TestCase):
|
|||
tools=None,
|
||||
tool_choice=None,
|
||||
)
|
||||
self.assertNotIn('num_ctx', mock_completion.call_args.kwargs)
|
||||
self.assertNotIn("num_ctx", mock_completion.call_args.kwargs)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue