mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
fix bug
This commit is contained in:
parent
4feea49b22
commit
ab55303fa1
4 changed files with 3 additions and 2 deletions
Binary file not shown.
|
|
@ -35,6 +35,8 @@ class Action(SerializationMixin, ContextMixin, BaseModel):
|
|||
|
||||
@property
|
||||
def repo(self) -> ProjectRepo:
|
||||
if not self.context.repo:
|
||||
self.context.repo = ProjectRepo(self.context.git_repo)
|
||||
return self.context.repo
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ def test_context_1():
|
|||
assert ctx.git_repo is None
|
||||
assert ctx.src_workspace is None
|
||||
assert ctx.cost_manager is not None
|
||||
assert ctx.options is not None
|
||||
|
||||
|
||||
def test_context_2():
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def test_config_mixin_4_multi_inheritance_override_config():
|
|||
|
||||
print(obj.__dict__.keys())
|
||||
assert "private_config" in obj.__dict__.keys()
|
||||
assert obj.llm.model == "mock_zhipu_model"
|
||||
assert obj.config.llm.model == "mock_zhipu_model"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue