🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fixbug: WriteTest failed
莘权 马29bbe5752d9e
diff --git a/metagpt/actions/write_test.py b/metagpt/actions/write_test.pyindex 9eb0bdbb6..850606ca8 100644--- a/metagpt/actions/write_test.py+++ b/metagpt/actions/write_test.py@@ -44,7 +44,7 @@ you should correctly import the necessary classes based on these file locations!class WriteTest(Action):name: str = "WriteTest"- context: Optional[str] = None+ context: Optional[TestingContext] = Nonellm: BaseGPTAPI = Field(default_factory=LLM)async def write_code(self, prompt):diff --git a/tests/metagpt/actions/test_write_test.py b/tests/metagpt/actions/test_write_test.pyindex a3190fb0e..9c6971ad3 100644--- a/tests/metagpt/actions/test_write_test.py+++ b/tests/metagpt/actions/test_write_test.py@@ -51,3 +51,7 @@ async def test_write_code_invalid_code(mocker):# Assert that the returned code is the same as the invalid code stringassert code == "Invalid Code String"+++if __name__ == "__main__":+ pytest.main([__file__, "-s"])