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:
Paul Gauthier 2023-05-28 22:19:44 -07:00
parent 346eb7a834
commit 03f300ec75

View file

@ -65,13 +65,7 @@ def my_function(arg1, arg2):
def test_check_for_ctags_success(self): def test_check_for_ctags_success(self):
with patch("subprocess.run") as mock_run: with patch("subprocess.run") as mock_run:
mock_run.return_value = CompletedProcess(args=["ctags", "--version"], returncode=0, stdout=b'''{ 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"}')
"_type": "tag",
"name": "status",
"path": "aider/main.py",
"pattern": "/^ status = main()$/",
"kind": "variable"
}''')
repo_map = RepoMap(use_ctags=True) repo_map = RepoMap(use_ctags=True)
result = repo_map.check_for_ctags() result = repo_map.check_for_ctags()
self.assertTrue(result) self.assertTrue(result)