mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 21:04:59 +00:00
Add unit tests for the cmd_lint
command
This commit is contained in:
parent
cf35c2db4e
commit
f90cd6b69b
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase, mock
|
||||||
|
|
||||||
import git
|
import git
|
||||||
|
|
||||||
|
@ -721,7 +721,7 @@ class TestCommands(TestCase):
|
||||||
file_path.write_text("def hello():\n print('Hello, World!')\n\n# Dirty line\n")
|
file_path.write_text("def hello():\n print('Hello, World!')\n\n# Dirty line\n")
|
||||||
|
|
||||||
# Mock the linter.lint method
|
# Mock the linter.lint method
|
||||||
with unittest.mock.patch.object(coder.linter, "lint") as mock_lint:
|
with mock.patch.object(coder.linter, "lint") as mock_lint:
|
||||||
# Run cmd_lint
|
# Run cmd_lint
|
||||||
commands.cmd_lint()
|
commands.cmd_lint()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue