From 8e2b92febb6d563598fe620197567895a02fa292 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 13 Jul 2023 16:02:29 -0700 Subject: [PATCH] close the open cache files, so Windows won't error --- tests/test_repomap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_repomap.py b/tests/test_repomap.py index 6a02f9ba3..328ee3bbe 100644 --- a/tests/test_repomap.py +++ b/tests/test_repomap.py @@ -33,6 +33,9 @@ class TestRepoMap(unittest.TestCase): self.assertIn("test_file3.md", 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): # Create a temporary directory with a sample Python file containing identifiers test_file1 = "test_file_with_identifiers.py" @@ -83,6 +86,9 @@ print(my_function(3, 4)) self.assertIn("my_function", 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): with patch("subprocess.run") as mock_run: mock_run.side_effect = Exception("ctags not found") @@ -133,6 +139,7 @@ print(my_function(3, 4)) for file in test_files: self.assertIn(file, result) + # close the open cache files, so Windows won't error del repo_map