mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 20:35:00 +00:00
style: Apply linter edits to test_main.py
This commit is contained in:
parent
ec836b99cc
commit
cb9da29bc3
1 changed files with 10 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import json
|
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
@ -494,15 +494,18 @@ class TestMain(TestCase):
|
||||||
def test_model_metadata_file(self):
|
def test_model_metadata_file(self):
|
||||||
with GitTemporaryDirectory():
|
with GitTemporaryDirectory():
|
||||||
metadata_file = Path(".aider.model.metadata.json")
|
metadata_file = Path(".aider.model.metadata.json")
|
||||||
metadata_content = {
|
metadata_content = {"deepseek-chat": {"max_input_tokens": 1234}}
|
||||||
"deepseek-chat": {
|
|
||||||
"max_input_tokens": 1234
|
|
||||||
}
|
|
||||||
}
|
|
||||||
metadata_file.write_text(json.dumps(metadata_content))
|
metadata_file.write_text(json.dumps(metadata_content))
|
||||||
|
|
||||||
coder = main(
|
coder = main(
|
||||||
["--model", "deepseek-chat", "--model-metadata-file", str(metadata_file), "--exit", "--yes"],
|
[
|
||||||
|
"--model",
|
||||||
|
"deepseek-chat",
|
||||||
|
"--model-metadata-file",
|
||||||
|
str(metadata_file),
|
||||||
|
"--exit",
|
||||||
|
"--yes",
|
||||||
|
],
|
||||||
input=DummyInput(),
|
input=DummyInput(),
|
||||||
output=DummyOutput(),
|
output=DummyOutput(),
|
||||||
return_coder=True,
|
return_coder=True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue