Skip to content

Commit

Permalink
don't expect Diff Reference section in code_message if there are no c…
Browse files Browse the repository at this point in the history
…hanges
  • Loading branch information
granawkins committed Apr 5, 2024
1 parent 68d7b26 commit b17e114
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/code_context_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,10 @@ def func_4(string):
mocker.patch.object(DefaultFilter, "filter", side_effect=filter_mock)

code_message = await code_context.get_code_message(0, prompt="prompt")
assert count_tokens(code_message, "gpt-4", full_message=True) == 103 # Code
assert count_tokens(code_message, "gpt-4", full_message=True) == 95 # Code
assert (
code_message
== """\
Diff References: index (last commit)
Code Files:
file_1.py (search-result, user-included)
Expand Down

0 comments on commit b17e114

Please sign in to comment.