Skip to content

Commit

Permalink
fix formatting issue (pre-commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
umermansoor committed Jul 28, 2024
1 parent 4635007 commit f5ea3a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/agentchat/test_function_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,12 @@ def test_json_extraction():

jstr = '{"code": "a=\\"hello\\""}'
assert user._format_json_str(jstr) == '{"code": "a=\\"hello\\""}'

jstr = '{\n"tool": "python",\n"query": "print(\'hello\')\n\tprint(\'world\')"\n}' # mixed newlines and tabs
assert user._format_json_str(jstr) == '{"tool": "python","query": "print(\'hello\')\\n\\tprint(\'world\')"}'

jstr = '{}' # empty json
assert user._format_json_str(jstr) == '{}'
jstr = '{\n"tool": "python",\n"query": "print(\'hello\')\n\tprint(\'world\')"\n}' # mixed newlines and tabs
assert user._format_json_str(jstr) == '{"tool": "python","query": "print(\'hello\')\\n\\tprint(\'world\')"}'

jstr = "{}" # empty json
assert user._format_json_str(jstr) == "{}"


def test_execute_function():
Expand Down

0 comments on commit f5ea3a9

Please sign in to comment.