style: Apply linter edits to test_main.py

This commit is contained in:
Paul Gauthier (aider) 2024-08-15 14:45:16 -07:00
parent ec836b99cc
commit cb9da29bc3

View file

@ -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,