XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Update backend.py

f17056ff
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +9 -1
Modified etc/unittest/backend.py +9 -1
@@ -9,6 +9,12 @@ try:
9 9 has_requirements = True
10 10 except:
11 11 has_requirements = False
12 try:
13 from g4f.tools.web_search import
14 search
15 has_search = True
16 except:
17 has_search = False
12 18 try:
13 19 from ddgs.exceptions import DDGSException
14 20 except ImportError:
@@ -39,7 +45,9 @@ class TestBackendApi(unittest.TestCase):
39 45 self.assertTrue(len(response) > 0)
40 46
41 47 def test_search(self):
42 from g4f.gui.server.internet import search
48 if not has_search:
49 self.skipTest("import error")
50 return
43 51 try:
44 52 result = asyncio.run(search("Hello"))
45 53 except DDGSException as e: