mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +00:00
close the open cache files, so Windows won't error
This commit is contained in:
parent
24015dab5f
commit
8e2b92febb
1 changed files with 7 additions and 0 deletions
|
@ -33,6 +33,9 @@ class TestRepoMap(unittest.TestCase):
|
||||||
self.assertIn("test_file3.md", result)
|
self.assertIn("test_file3.md", result)
|
||||||
self.assertIn("test_file4.json", result)
|
self.assertIn("test_file4.json", result)
|
||||||
|
|
||||||
|
# close the open cache files, so Windows won't error
|
||||||
|
del repo_map
|
||||||
|
|
||||||
def test_get_repo_map_with_identifiers(self):
|
def test_get_repo_map_with_identifiers(self):
|
||||||
# Create a temporary directory with a sample Python file containing identifiers
|
# Create a temporary directory with a sample Python file containing identifiers
|
||||||
test_file1 = "test_file_with_identifiers.py"
|
test_file1 = "test_file_with_identifiers.py"
|
||||||
|
@ -83,6 +86,9 @@ print(my_function(3, 4))
|
||||||
self.assertIn("my_function", result)
|
self.assertIn("my_function", result)
|
||||||
self.assertIn("test_file_pass.py", result)
|
self.assertIn("test_file_pass.py", result)
|
||||||
|
|
||||||
|
# close the open cache files, so Windows won't error
|
||||||
|
del repo_map
|
||||||
|
|
||||||
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")
|
||||||
|
@ -133,6 +139,7 @@ print(my_function(3, 4))
|
||||||
for file in test_files:
|
for file in test_files:
|
||||||
self.assertIn(file, result)
|
self.assertIn(file, result)
|
||||||
|
|
||||||
|
# close the open cache files, so Windows won't error
|
||||||
del repo_map
|
del repo_map
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue