Skip to content

Commit

Permalink
fix: fixed ctags test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 31, 2023
1 parent 8616718 commit fa7d409
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gptme/tools/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def ctags() -> str:
try:
tags.append(json.loads(line))
except json.JSONDecodeError:
output += [" failed to parse: {line}"]
output += [f" failed to parse: {line}"]
break

files = {tag["path"] for tag in tags}
Expand Down
4 changes: 3 additions & 1 deletion tests/test_tools_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ def test_ctags(shell):
pytest.skip("ctags not installed")

output = ctags()
assert "function" in output, f"Expected 'def' in output: {output}"
expected_strings = ["def", "class", "gptme"]
for s in expected_strings:
assert s in output, f"Expected '{s}' in output: {output}"

0 comments on commit fa7d409

Please sign in to comment.