mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-06 21:52:25 +08:00
fix bugs
This commit is contained in:
@@ -1 +1 @@
|
||||
coverage run --source ./metagpt -m pytest --durations=0 && coverage report -m && coverage html && open htmlcov/index.html
|
||||
coverage run --source ./metagpt -m pytest --durations=0 --timeout=100 && coverage report -m && coverage html && open htmlcov/index.html
|
||||
|
||||
Binary file not shown.
Binary file not shown.
1
setup.py
1
setup.py
@@ -39,6 +39,7 @@ extras_require["test"] = [
|
||||
"pytest-mock",
|
||||
"pytest-html",
|
||||
"pytest-xdist",
|
||||
"pytest-timeout",
|
||||
"connexion[uvicorn]~=3.0.5",
|
||||
"azure-cognitiveservices-speech~=1.31.0",
|
||||
"aioboto3~=11.3.0",
|
||||
|
||||
@@ -27,6 +27,6 @@ async def test_action_deserialize():
|
||||
|
||||
new_action = Action(**serialized_data)
|
||||
|
||||
assert new_action.name == ""
|
||||
assert new_action.name == "Action"
|
||||
assert isinstance(new_action.llm, type(LLM()))
|
||||
assert len(await new_action._aask("who are you")) > 0
|
||||
|
||||
@@ -26,7 +26,7 @@ async def test_write_design_deserialize():
|
||||
action = WriteDesign()
|
||||
serialized_data = action.model_dump()
|
||||
new_action = WriteDesign(**serialized_data)
|
||||
assert new_action.name == ""
|
||||
assert new_action.name == "WriteDesign"
|
||||
await new_action.run(with_messages="write a cli snake game")
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ async def test_write_task_deserialize():
|
||||
action = WriteTasks()
|
||||
serialized_data = action.model_dump()
|
||||
new_action = WriteTasks(**serialized_data)
|
||||
assert new_action.name == "CreateTasks"
|
||||
assert new_action.name == "WriteTasks"
|
||||
await new_action.run(with_messages="write a cli snake game")
|
||||
|
||||
@@ -38,7 +38,7 @@ async def test_action_deserialize(style: str, part: str):
|
||||
|
||||
new_action = WriteDocstring(**serialized_data)
|
||||
|
||||
assert not new_action.name
|
||||
assert new_action.name == "WriteDocstring"
|
||||
assert new_action.desc == "Write docstring for code."
|
||||
ret = await new_action.run(code, style=style)
|
||||
assert part in ret
|
||||
|
||||
Reference in New Issue
Block a user