fix: 关闭运行时版本检查提醒

Description:

Log:
This commit is contained in:
mikigo 2024-06-14 10:02:44 +08:00
parent a281bd7c20
commit e2feb25f5e
2 changed files with 11 additions and 11 deletions

View File

@ -57,7 +57,7 @@ def write_case_result(item, report):
run_case_id = None
from_case_id = None
for mark in item.own_markers:
if mark.args == ("PMS用例ID",):
if mark.args and isinstance(mark.args[0], str) and mark.args[0].strip("*") == "PMS用例ID":
caseid = mark.name
elif mark.args == ("run_case_id",):
run_case_id = mark.name

View File

@ -86,16 +86,16 @@ class LocalRunner:
**kwargs,
):
logger("INFO")
try:
github_tags = RequestX().open_url(
f"https://api.github.com/repos/linuxdeepin/youqu/tags", timeout=1
)
latest_tag = json.loads(github_tags)[0].get("name")
if GlobalConfig.current_tag != latest_tag:
print(f"YouQu最新版本为: {latest_tag},当前使用版本为: {GlobalConfig.current_tag}")
print(f"建议使用sudo pip3 install youqu=={latest_tag} 升级版本")
except Exception:
pass
# try:
# github_tags = RequestX().open_url(
# f"https://api.github.com/repos/linuxdeepin/youqu/tags", timeout=1
# )
# latest_tag = json.loads(github_tags)[0].get("name")
# if GlobalConfig.current_tag != latest_tag:
# print(f"YouQu最新版本为: {latest_tag},当前使用版本为: {GlobalConfig.current_tag}")
# print(f"建议使用sudo pip3 install youqu=={latest_tag} 升级版本")
# except Exception:
# pass
self.default = {
Args.app_name.value: transform_app_name(
app_name if app_name or case_file else GlobalConfig.APP_NAME