new joyhub_backend

This commit is contained in:
guojiabao
2026-05-18 15:20:48 +08:00
parent eb053a347f
commit 84b8382a31
14 changed files with 209899 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
import os
import sys
current_file_path = os.path.abspath(__file__)
project_root = os.path.abspath(os.path.join(os.path.dirname(current_file_path), '../../../..'))
if project_root not in sys.path:
sys.path.insert(0, project_root)
try:
import allure_pytest.listener
except ImportError:
allure_pytest = None
def _allure_test_fixtures_compatible(item):
fixturemanager = item.session._fixturemanager
fixturedefs = []
if hasattr(item, "_request") and hasattr(item._request, "fixturenames"):
for name in item._request.fixturenames:
try:
fixturedefs_pytest = fixturemanager.getfixturedefs(name, item)
except AttributeError:
fixturedefs_pytest = fixturemanager.getfixturedefs(name, item.nodeid)
if fixturedefs_pytest:
fixturedefs.extend(fixturedefs_pytest)
return fixturedefs
if allure_pytest is not None:
allure_pytest.listener._test_fixtures = _allure_test_fixtures_compatible