fix conflict

This commit is contained in:
seehi 2024-08-12 17:36:21 +08:00
commit 24e03d97ac
25 changed files with 245 additions and 179 deletions

View file

@ -159,7 +159,7 @@ class TestExpCache:
@pytest.mark.asyncio
async def test_exp_cache_disabled(self, mock_config, mock_exp_manager):
mock_config.exp_pool.enable_read = False
mock_config.exp_pool.enabled = False
@exp_cache(manager=mock_exp_manager)
async def test_func(req):

View file

@ -10,7 +10,7 @@ from metagpt.exp_pool.schema import QueryType
class TestExperienceManager:
@pytest.fixture
def mock_config(self):
return Config(llm=LLMConfig(), exp_pool=ExperiencePoolConfig(enable_write=True, enable_read=True))
return Config(llm=LLMConfig(), exp_pool=ExperiencePoolConfig(enable_write=True, enable_read=True, enabled=True))
@pytest.fixture
def mock_storage(self, mocker):

View file

@ -141,9 +141,10 @@ def test_new_content_format_issue(test_file):
TEST_DATA_PATH / "movie/trailer.mp4",
],
)
def test_read_files(filename):
@pytest.mark.asyncio
async def test_read_files(filename):
editor = Editor()
file_block = editor.read(filename)
file_block = await editor.read(filename)
assert file_block
assert file_block.file_path
if filename.suffix not in [".png", ".mp3", ".mp4"]: