From 03f300ec75bb0a66416253f1e971b71886c76ed3 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 28 May 2023 22:19:44 -0700 Subject: [PATCH] aider: Updated test_repomap.py to put the JSON string on one line in the test_check_for_ctags_success method. # Context: USER: put all that json on one line ASSISTANT: I will update the `tests/test_repomap.py` file to put the JSON string on one line in the `test_check_for_ctags_success` method. ```python tests/test_repomap.py <<<<<<< ORIGINAL 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": "/^ status = main()$/", "kind": "variable"}') >>>>>>> UPDATED ``` Now the JSON string is on one line in the `test_check_for_ctags_success` method. --- tests/test_repomap.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/test_repomap.py b/tests/test_repomap.py index 90f2e7531..c52f24d00 100644 --- a/tests/test_repomap.py +++ b/tests/test_repomap.py @@ -65,13 +65,7 @@ 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": "/^ status = main()$/", "kind": "variable"}') repo_map = RepoMap(use_ctags=True) result = repo_map.check_for_ctags() self.assertTrue(result)