代码拉取完成,页面将自动刷新
import os
import pytest
import yaml
cli_prompt_case_file = 'autotest/chat_prompt_case.yaml'
common_prompt_case_file = 'autotest/prompt_case.yaml'
config_file = 'autotest/config.yaml'
@pytest.fixture(scope='session')
def config():
config_path = os.path.join(config_file)
with open(config_path) as f:
env_config = yaml.load(f.read(), Loader=yaml.SafeLoader)
return env_config
@pytest.fixture(scope='session')
def cli_case_config():
case_path = os.path.join(cli_prompt_case_file)
with open(case_path) as f:
case_config = yaml.load(f.read(), Loader=yaml.SafeLoader)
return case_config
@pytest.fixture(scope='class', autouse=True)
def common_case_config():
case_path = os.path.join(common_prompt_case_file)
with open(case_path) as f:
case_config = yaml.load(f.read(), Loader=yaml.SafeLoader)
return case_config
def pytest_addoption(parser):
parser.addoption('--run_id',
action='store',
default='',
help='github run_id')
@pytest.fixture(scope='session')
def run_id(request):
return request.config.getoption('--run_id')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。