mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-18 13:55:17 +02:00
feat: merge geekan:env_refactor
This commit is contained in:
commit
4582f65cf8
32 changed files with 240 additions and 107 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Date : 2023/7/22 02:40
|
||||
# @Author : stellahong (stellahong@fuzhi.ai)
|
||||
# @Author : stellahong (stellahong@deepwisdom.ai)
|
||||
#
|
||||
from tests.metagpt.roles.ui_role import UIDesign
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Date : 2023/7/22 02:40
|
||||
# @Author : stellahong (stellahong@fuzhi.ai)
|
||||
# @Author : stellahong (stellahong@deepwisdom.ai)
|
||||
#
|
||||
from metagpt.roles import ProductManager
|
||||
from metagpt.team import Team
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Date : 2023/7/15 16:40
|
||||
# @Author : stellahong (stellahong@fuzhi.ai)
|
||||
# @Author : stellahong (stellahong@deepwisdom.ai)
|
||||
# @Desc :
|
||||
import os
|
||||
import re
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ runner = CliRunner()
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_team():
|
||||
# FIXME: we're now using "metagpt" cli, so the entrance should be replaced instead.
|
||||
company = Team()
|
||||
company.run_project("做一个基础搜索引擎,可以支持知识库")
|
||||
history = await company.run(n_round=5)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# @Date : 2023/7/22 02:40
|
||||
# @Author : stellahong (stellahong@fuzhi.ai)
|
||||
# @Author : stellahong (stellahong@deepwisdom.ai)
|
||||
#
|
||||
import os
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from metagpt.tools import WebBrowserEngineType, web_browser_engine
|
|||
@pytest.mark.parametrize(
|
||||
"browser_type, url, urls",
|
||||
[
|
||||
(WebBrowserEngineType.PLAYWRIGHT, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
(WebBrowserEngineType.SELENIUM, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
(WebBrowserEngineType.PLAYWRIGHT, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
(WebBrowserEngineType.SELENIUM, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
],
|
||||
ids=["playwright", "selenium"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ from metagpt.tools import web_browser_engine_playwright
|
|||
@pytest.mark.parametrize(
|
||||
"browser_type, use_proxy, kwagrs, url, urls",
|
||||
[
|
||||
("chromium", {"proxy": True}, {}, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
("firefox", {}, {"ignore_https_errors": True}, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
("webkit", {}, {"ignore_https_errors": True}, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
("chromium", {"proxy": True}, {}, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
("firefox", {}, {"ignore_https_errors": True}, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
("webkit", {}, {"ignore_https_errors": True}, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
],
|
||||
ids=["chromium-normal", "firefox-normal", "webkit-normal"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ from metagpt.tools import web_browser_engine_selenium
|
|||
@pytest.mark.parametrize(
|
||||
"browser_type, use_proxy, url, urls",
|
||||
[
|
||||
("chrome", True, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
("firefox", False, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
("edge", False, "https://fuzhi.ai", ("https://fuzhi.ai",)),
|
||||
("chrome", True, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
("firefox", False, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
("edge", False, "https://deepwisdom.ai", ("https://deepwisdom.ai",)),
|
||||
],
|
||||
ids=["chrome-normal", "firefox-normal", "edge-normal"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -73,6 +73,13 @@ async def test_git1():
|
|||
repo1 = GitRepository(local_path=local_path, auto_init=False)
|
||||
assert repo1.changed_files
|
||||
|
||||
file_repo = repo1.new_file_repository("__pycache__")
|
||||
await file_repo.save("a.pyc", content="")
|
||||
all_files = repo1.get_files(relative_path=".", filter_ignored=False)
|
||||
assert "__pycache__/a.pyc" in all_files
|
||||
all_files = repo1.get_files(relative_path=".", filter_ignored=True)
|
||||
assert "__pycache__/a.pyc" not in all_files
|
||||
|
||||
repo1.delete_repository()
|
||||
assert not local_path.exists()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue