From f5ea3a93c09c557082f878f45d56243b6cca26fb Mon Sep 17 00:00:00 2001 From: Umer Mansoor Date: Sun, 28 Jul 2024 07:38:45 -0700 Subject: [PATCH] fix formatting issue (pre-commit) --- test/agentchat/test_function_call.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/agentchat/test_function_call.py b/test/agentchat/test_function_call.py index 8d4dd2fa4ed0..34d547b236c9 100755 --- a/test/agentchat/test_function_call.py +++ b/test/agentchat/test_function_call.py @@ -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():