mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
isort
This commit is contained in:
parent
95be55a2b6
commit
92cd2f3ce6
15 changed files with 56 additions and 38 deletions
|
@ -1,9 +1,11 @@
|
|||
import os
|
||||
import tempfile
|
||||
import unittest
|
||||
from aider.repomap import RepoMap
|
||||
from unittest.mock import patch
|
||||
from subprocess import CompletedProcess
|
||||
from unittest.mock import patch
|
||||
|
||||
from aider.repomap import RepoMap
|
||||
|
||||
|
||||
class TestRepoMap(unittest.TestCase):
|
||||
def test_get_tags_map(self):
|
||||
|
@ -65,7 +67,14 @@ def my_function(arg1, arg2):
|
|||
|
||||
def test_check_for_ctags_success(self):
|
||||
with patch("subprocess.run") as mock_run:
|
||||
mock_run.return_value = CompletedProcess(args=["ctags", "--version"], returncode=0, stdout=b'{"_type": "tag", "name": "status", "path": "aider/main.py", "pattern": "/^ status = main()$/", "kind": "variable"}')
|
||||
mock_run.return_value = CompletedProcess(
|
||||
args=["ctags", "--version"],
|
||||
returncode=0,
|
||||
stdout=(
|
||||
b'{"_type": "tag", "name": "status", "path": "aider/main.py", "pattern": "/^ '
|
||||
b' status = main()$/", "kind": "variable"}'
|
||||
),
|
||||
)
|
||||
repo_map = RepoMap(use_ctags=True)
|
||||
result = repo_map.check_for_ctags()
|
||||
self.assertTrue(result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue