🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
refactor: pre-commit
莘权 马8d925e50f164
diff --git a/tests/metagpt/actions/test_invoice_ocr.py b/tests/metagpt/actions/test_invoice_ocr.pyindex b3b93cf9f..12b1b4b30 100644--- a/tests/metagpt/actions/test_invoice_ocr.py+++ b/tests/metagpt/actions/test_invoice_ocr.py@@ -34,10 +34,7 @@ async def test_invoice_ocr(invoice_path: str):@pytest.mark.parametrize(("invoice_path", "expected_result"),[- (- "../../data/invoices/invoice-1.pdf",- [{"收款人": "小明", "城市": "深圳市", "总费用/元": "412.00", "开票日期": "2023年02月03日"}]- ),+ ("../../data/invoices/invoice-1.pdf", [{"收款人": "小明", "城市": "深圳市", "总费用/元": "412.00", "开票日期": "2023年02月03日"}]),],)async def test_generate_table(invoice_path: str, expected_result: list[dict]):diff --git a/tests/metagpt/roles/test_invoice_ocr_assistant.py b/tests/metagpt/roles/test_invoice_ocr_assistant.pyindex 48abb9eb8..500d93a77 100644--- a/tests/metagpt/roles/test_invoice_ocr_assistant.py+++ b/tests/metagpt/roles/test_invoice_ocr_assistant.py@@ -37,12 +37,10 @@ from metagpt.schema import MessagePath("../../data/invoices/invoice-3.jpg"),Path("../../../data/invoice_table/invoice-3.xlsx"),{"收款人": "夏天", "城市": "福州", "总费用/元": 2462.00, "开票日期": "2023年08月26日"},- )+ ),],)-async def test_invoice_ocr_assistant(- query: str, invoice_path: Path, invoice_table_path: Path, expected_result: dict-):+async def test_invoice_ocr_assistant(query: str, invoice_path: Path, invoice_table_path: Path, expected_result: dict):invoice_path = Path.cwd() / invoice_pathrole = InvoiceOCRAssistant()await role.run(Message(content=query, instruct_content=InvoicePath(file_path=invoice_path)))@@ -56,4 +54,3 @@ async def test_invoice_ocr_assistant(assert expected_result["城市"] in resp["城市"]assert int(expected_result["总费用/元"]) == int(resp["总费用/元"])assert expected_result["开票日期"] == resp["开票日期"]-diff --git a/tests/metagpt/roles/test_tutorial_assistant.py b/tests/metagpt/roles/test_tutorial_assistant.pyindex 4455e1bf6..ca54aaff5 100644--- a/tests/metagpt/roles/test_tutorial_assistant.py+++ b/tests/metagpt/roles/test_tutorial_assistant.py@@ -6,6 +6,7 @@@File : test_tutorial_assistant.py"""import shutil+import aiofilesimport pytest