mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
fix: typo error
This commit is contained in:
@@ -365,7 +365,7 @@ class HarParser(object):
|
||||
utils.dump_yaml(testcase, output_testcase_file)
|
||||
else:
|
||||
# default to generate pytest file
|
||||
testcase["config"]["path"] = os.path.join(os.getcwd(), self.har_file_path)
|
||||
testcase["config"]["path"] = self.har_file_path
|
||||
output_testcase_file = make_testcase(testcase)
|
||||
format_pytest_with_black(output_testcase_file)
|
||||
|
||||
|
||||
@@ -46,10 +46,9 @@ import os
|
||||
import sys
|
||||
from typing import Text, NoReturn
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from httprunner.parser import parse_variables_mapping
|
||||
from httprunner.models import TStep, FunctionsMapping
|
||||
from httprunner.parser import parse_variables_mapping
|
||||
from loguru import logger
|
||||
|
||||
try:
|
||||
import filetype
|
||||
@@ -146,7 +145,7 @@ def multipart_encoder(**kwargs):
|
||||
# value is not absolute file path, check if it is relative file path
|
||||
from httprunner.loader import load_project_meta
|
||||
|
||||
project_meta = load_project_meta(os.getcwd())
|
||||
project_meta = load_project_meta("")
|
||||
|
||||
_file_path = os.path.join(project_meta.RootDir, value)
|
||||
is_exists_file = os.path.isfile(_file_path)
|
||||
|
||||
@@ -361,7 +361,7 @@ def make_testcase(testcase: Dict, dir_path: Text = None) -> Text:
|
||||
teststep["testcase"] = ref_testcase_cls_name
|
||||
|
||||
# prepare import ref testcase
|
||||
ref_testcase_python_path = ref_testcase_python_path[len(os.getcwd()) + 1 :]
|
||||
ref_testcase_python_path = __ensure_cwd_relative(ref_testcase_python_path)
|
||||
ref_module_name, _ = os.path.splitext(ref_testcase_python_path)
|
||||
ref_module_name = ref_module_name.replace(os.sep, ".")
|
||||
imports_list.append(
|
||||
|
||||
Reference in New Issue
Block a user