mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
style: Format code with linter and improve readability
This commit is contained in:
parent
7b9a76c5ea
commit
e0aadbd961
1 changed files with 7 additions and 4 deletions
|
@ -82,7 +82,9 @@ class TestModels(unittest.TestCase):
|
||||||
) # Should return True because there's a problem with the editor model
|
) # Should return True because there's a problem with the editor model
|
||||||
mock_io.tool_warning.assert_called_with(ANY) # Ensure a warning was issued
|
mock_io.tool_warning.assert_called_with(ANY) # Ensure a warning was issued
|
||||||
|
|
||||||
warning_messages = [warning_call.args[0] for warning_call in mock_io.tool_warning.call_args_list]
|
warning_messages = [
|
||||||
|
warning_call.args[0] for warning_call in mock_io.tool_warning.call_args_list
|
||||||
|
]
|
||||||
print("Warning messages:", warning_messages) # Add this line
|
print("Warning messages:", warning_messages) # Add this line
|
||||||
|
|
||||||
self.assertGreaterEqual(mock_io.tool_warning.call_count, 1) # Expect two warnings
|
self.assertGreaterEqual(mock_io.tool_warning.call_count, 1) # Expect two warnings
|
||||||
|
@ -92,6 +94,7 @@ class TestModels(unittest.TestCase):
|
||||||
|
|
||||||
def test_default_and_override_settings(self):
|
def test_default_and_override_settings(self):
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
# Create temporary YAML file with test settings
|
# Create temporary YAML file with test settings
|
||||||
|
@ -104,10 +107,10 @@ class TestModels(unittest.TestCase):
|
||||||
{
|
{
|
||||||
"name": "aider/override",
|
"name": "aider/override",
|
||||||
"use_temperature": False,
|
"use_temperature": False,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
with tempfile.NamedTemporaryFile(mode='w', suffix='.yml') as tmp:
|
with tempfile.NamedTemporaryFile(mode="w", suffix=".yml") as tmp:
|
||||||
yaml.dump(test_settings, tmp)
|
yaml.dump(test_settings, tmp)
|
||||||
tmp.flush()
|
tmp.flush()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue