mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 21:34:59 +00:00
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.
This commit is contained in:
parent
346eb7a834
commit
03f300ec75
1 changed files with 1 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue