fix bug in test

This commit is contained in:
geekan 2023-12-26 19:19:32 +08:00
parent 0435b1321f
commit 9531dbf3ff
3 changed files with 4 additions and 12 deletions

View file

@ -7,12 +7,9 @@
"""
import random
import pytest
from metagpt.document_store.lancedb_store import LanceStore
@pytest
def test_lance_store():
# This simply establishes the connection to the database, so we can drop the table if it exists
store = LanceStore("test")

View file

@ -8,7 +8,7 @@
"""
import pytest
from metagpt.schema import AIMessage, Message, RawMessage, SystemMessage, UserMessage
from metagpt.schema import AIMessage, Message, SystemMessage, UserMessage
def test_message():
@ -29,13 +29,5 @@ def test_all_messages():
assert msg.content == test_content
def test_raw_message():
msg = RawMessage(role="user", content="raw")
assert msg["role"] == "user"
assert msg["content"] == "raw"
with pytest.raises(KeyError):
assert msg["1"] == 1, "KeyError: '1'"
if __name__ == "__main__":
pytest.main([__file__, "-s"])