From 76c95f8428ac08b5bd1a12f4e742c108fbae08eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=A3=92=E6=A3=92?= Date: Mon, 11 Dec 2023 16:00:09 +0800 Subject: [PATCH] chore: add logger.debug(). --- tests/metagpt/actions/test_make_tools.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/metagpt/actions/test_make_tools.py b/tests/metagpt/actions/test_make_tools.py index 7811cf7ab..264599439 100644 --- a/tests/metagpt/actions/test_make_tools.py +++ b/tests/metagpt/actions/test_make_tools.py @@ -2,6 +2,7 @@ import pytest from metagpt.actions.execute_code import ExecutePyCode from metagpt.actions.make_tools import MakeTools +from metagpt.logs import logger @pytest.mark.asyncio @@ -10,12 +11,12 @@ async def test_make_tools(): msgs = [{'role': 'assistant', 'content': code}] mt = MakeTools() tool_code = await mt.run(msgs) - print(tool_code) + logger.debug(tool_code) ep = ExecutePyCode() tool_code = "!pip install yfinance\n" + tool_code result, res_type = await ep.run(tool_code) assert res_type is True - print(result) + logger.debug(result) @pytest.mark.asyncio @@ -26,12 +27,12 @@ async def test_make_tools2(): msgs = [{'role': 'assistant', 'content': code}] mt = MakeTools() tool_code = await mt.run(msgs) - print(tool_code) + logger.debug(tool_code) ep = ExecutePyCode() tool_code = tool_code result, res_type = await ep.run(tool_code) assert res_type is True - print(result) + logger.debug(result) @pytest.mark.asyncio @@ -43,9 +44,9 @@ async def test_make_tools3(): msgs = [{'role': 'assistant', 'content': code}] mt = MakeTools() tool_code = await mt.run(msgs) - print(tool_code) + logger.debug(tool_code) ep = ExecutePyCode() tool_code = tool_code result, res_type = await ep.run(tool_code) assert res_type is True - print(result) + logger.debug(result)