mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: summary path
This commit is contained in:
@@ -220,11 +220,8 @@ def generate_conftest_for_summary(args: List):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
project_meta = load_project_meta(test_path)
|
project_meta = load_project_meta(test_path)
|
||||||
conftest_path = os.path.join(project_meta.RootDir, "conftest.py")
|
project_root_dir = ensure_file_path_valid(project_meta.RootDir)
|
||||||
conftest_path = ensure_file_path_valid(conftest_path)
|
conftest_path = os.path.join(project_root_dir, "conftest.py")
|
||||||
if os.path.isfile(conftest_path):
|
|
||||||
return
|
|
||||||
|
|
||||||
conftest_content = '''# NOTICE: Generated By HttpRunner.
|
conftest_content = '''# NOTICE: Generated By HttpRunner.
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
@@ -292,8 +289,8 @@ def session_fixture(request):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
test_path = os.path.abspath(test_path)
|
test_path = os.path.abspath(test_path)
|
||||||
logs_dir_path = os.path.join(project_meta.RootDir, "logs")
|
logs_dir_path = os.path.join(project_root_dir, "logs")
|
||||||
test_path_relative_path = test_path[len(project_meta.RootDir) + 1 :]
|
test_path_relative_path = test_path[len(project_root_dir) + 1 :]
|
||||||
|
|
||||||
if os.path.isdir(test_path):
|
if os.path.isdir(test_path):
|
||||||
file_foder_path = os.path.join(logs_dir_path, test_path_relative_path)
|
file_foder_path = os.path.join(logs_dir_path, test_path_relative_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user