feat: +log

This commit is contained in:
莘权 马 2024-05-10 23:48:16 +08:00
parent 6067245ae3
commit e01d4b3125
5 changed files with 44 additions and 4 deletions

View file

@ -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),
),
(

View file

@ -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",