mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 09:46:24 +02:00
fix bug in test
This commit is contained in:
parent
0435b1321f
commit
9531dbf3ff
3 changed files with 4 additions and 12 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue