mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
fixbug: WriteTest failed
This commit is contained in:
parent
780caf011d
commit
29bbe5752d
2 changed files with 5 additions and 1 deletions
|
|
@ -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] = None
|
||||
llm: BaseGPTAPI = Field(default_factory=LLM)
|
||||
|
||||
async def write_code(self, prompt):
|
||||
|
|
|
|||
|
|
@ -51,3 +51,7 @@ async def test_write_code_invalid_code(mocker):
|
|||
|
||||
# Assert that the returned code is the same as the invalid code string
|
||||
assert code == "Invalid Code String"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main([__file__, "-s"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue