mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 12:52:37 +02:00
feat: +log
This commit is contained in:
parent
6067245ae3
commit
e01d4b3125
5 changed files with 44 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ serdeser_path = Path(__file__).absolute().parent.joinpath("../data/serdeser_stor
|
|||
|
||||
class MockEnv(Environment):
|
||||
def publish_message(self, message: Message, peekable: bool = True) -> bool:
|
||||
logger.info(f"{message.metadata}:{message.content}")
|
||||
consumers = []
|
||||
for role, addrs in self.member_addrs.items():
|
||||
if is_send_to(message, addrs):
|
||||
|
|
@ -87,6 +88,7 @@ async def test_publish_and_process_message(env: Environment):
|
|||
assert len(env.history.storage) == 0
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
("content", "send_to"),
|
||||
|
|
@ -105,7 +107,7 @@ async def test_publish_and_process_message(env: Environment):
|
|||
any_to_str(ProjectManager),
|
||||
),
|
||||
(
|
||||
"Rewrite 'main.py' of the project at '/Users/iorishinier/github/MetaGPT/workspace/snake_game'",
|
||||
"src filename is 'game.py', Uncaught SyntaxError: Identifier 'Position' has already been declared (at game.js:1:1), the project at '/Users/iorishinier/github/bak/MetaGPT/workspace/snake_game'",
|
||||
any_to_str(Engineer),
|
||||
),
|
||||
(
|
||||
|
|
|
|||
|
|
@ -91,6 +91,39 @@ async def test_new_pr():
|
|||
assert pr
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.asyncio
|
||||
async def test_new_pr1():
|
||||
body = """
|
||||
>>> SUMMARY
|
||||
>>> Change HTTP library used to send requests
|
||||
>>>
|
||||
>>> TESTS
|
||||
>>> - [x] Send 'GET' request
|
||||
>>> - [x] Send 'POST' request with/without body
|
||||
"""
|
||||
pr = await GitRepository.create_pull(
|
||||
base_repo_name="iorisa/MetaGPT",
|
||||
base="fixbug/vscode",
|
||||
head_repo_name="send18/MetaGPT",
|
||||
head="dev",
|
||||
title="Test pr",
|
||||
body=body,
|
||||
access_token=await get_env(key="access_token", app_name="github"),
|
||||
)
|
||||
# pr = await GitRepository.create_pull(
|
||||
# head_repo_name="iorisa/MetaGPT",
|
||||
# head="fixbug/vscode",
|
||||
# base_repo_name="send18/MetaGPT",
|
||||
# base="dev",
|
||||
# title="Test pr",
|
||||
# body=body,
|
||||
# access_token=await get_env(key="access_token", app_name="github"),
|
||||
# )
|
||||
print(pr)
|
||||
assert pr
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.asyncio
|
||||
async def test_auth():
|
||||
|
|
@ -124,6 +157,7 @@ async def test_github(context):
|
|||
assert pr
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"content",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue