mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
Added import of unittest.mock to test_repomap.py.
This commit is contained in:
parent
f2a116e0e1
commit
8b3b4a2e26
1 changed files with 1 additions and 3 deletions
|
@ -2,7 +2,7 @@ import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
from aider.repomap import RepoMap
|
from aider.repomap import RepoMap
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
class TestRepoMap(unittest.TestCase):
|
class TestRepoMap(unittest.TestCase):
|
||||||
def test_get_tags_map(self):
|
def test_get_tags_map(self):
|
||||||
|
@ -55,8 +55,6 @@ def my_function(arg1, arg2):
|
||||||
self.assertIn("my_method", result)
|
self.assertIn("my_method", result)
|
||||||
self.assertIn("my_function", result)
|
self.assertIn("my_function", result)
|
||||||
|
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
def test_check_for_ctags_failure(self):
|
def test_check_for_ctags_failure(self):
|
||||||
with patch("subprocess.run") as mock_run:
|
with patch("subprocess.run") as mock_run:
|
||||||
mock_run.side_effect = Exception("ctags not found")
|
mock_run.side_effect = Exception("ctags not found")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue