fixbug: role init with is_human=True was not work

This commit is contained in:
kkdev163 2024-01-08 17:45:44 +08:00
parent ce3dc74ef3
commit 6cde039f7f
2 changed files with 7 additions and 0 deletions

View file

@ -4,6 +4,7 @@
import pytest
from metagpt.roles.role import Role
from metagpt.llm import HumanProvider
def test_role_desc():
@ -11,6 +12,9 @@ def test_role_desc():
assert role.profile == "Sales"
assert role.desc == "Best Seller"
def test_role_human():
role = Role(is_human=True)
assert isinstance(role.llm, HumanProvider)
if __name__ == "__main__":
pytest.main([__file__, "-s"])