This commit is contained in:
geekan
2024-01-02 23:38:51 +08:00
parent 78b7e164f9
commit 38015322b6
7 changed files with 6 additions and 5 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -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

View File

@@ -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")

View File

@@ -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