mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
fix generated log filename when testing folder with '/' ending
This commit is contained in:
+5
-5
@@ -415,13 +415,13 @@ def get_testcase_io(testcase):
|
|||||||
dict: input(variables) and output mapping.
|
dict: input(variables) and output mapping.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
runner = testcase.runner
|
test_runner = testcase.runner
|
||||||
variables = testcase.config.get("variables", [])
|
variables = testcase.config.get("variables", {})
|
||||||
output_list = testcase.config.get("output", [])
|
output_list = testcase.config.get("output", [])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"in": dict(variables),
|
"in": variables,
|
||||||
"out": runner.extract_output(output_list)
|
"out": test_runner.extract_output(output_list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -625,7 +625,7 @@ def _prepare_dump_info(project_mapping, tag_name):
|
|||||||
"""
|
"""
|
||||||
test_path = project_mapping.get("test_path") or "tests_mapping"
|
test_path = project_mapping.get("test_path") or "tests_mapping"
|
||||||
pwd_dir_path = project_mapping.get("PWD") or os.getcwd()
|
pwd_dir_path = project_mapping.get("PWD") or os.getcwd()
|
||||||
file_name, file_suffix = os.path.splitext(os.path.basename(test_path))
|
file_name, file_suffix = os.path.splitext(os.path.basename(test_path.rstrip("/")))
|
||||||
dump_file_name = "{}.{}.json".format(file_name, tag_name)
|
dump_file_name = "{}.{}.json".format(file_name, tag_name)
|
||||||
|
|
||||||
return pwd_dir_path, dump_file_name
|
return pwd_dir_path, dump_file_name
|
||||||
|
|||||||
Reference in New Issue
Block a user