mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 08:59:44 +08:00
change: load yaml file with FullLoader
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Release History
|
||||
|
||||
## 3.1.8 (2022-03-22)
|
||||
|
||||
- change: load yaml file with FullLoader
|
||||
|
||||
## 3.1.7 (2022-03-22)
|
||||
|
||||
- fix #1117: ignore comments and blank lines when parsing .env file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
__version__ = "3.1.7"
|
||||
__version__ = "3.1.8-beta"
|
||||
__description__ = "One-stop solution for HTTP(S) testing."
|
||||
|
||||
# import firstly for monkey patch if needed
|
||||
|
||||
@@ -4,17 +4,14 @@ import json
|
||||
import os
|
||||
import sys
|
||||
import types
|
||||
from typing import Tuple, Dict, Union, Text, List, Callable
|
||||
from typing import Callable, Dict, List, Text, Tuple, Union
|
||||
|
||||
import yaml
|
||||
from loguru import logger
|
||||
from pydantic import ValidationError
|
||||
from yaml.loader import FullLoader
|
||||
|
||||
from httprunner import builtin, utils
|
||||
from httprunner import exceptions
|
||||
from httprunner.models import TestCase, ProjectMeta, TestSuite
|
||||
|
||||
from httprunner import builtin, exceptions, utils
|
||||
from httprunner.models import ProjectMeta, TestCase, TestSuite
|
||||
|
||||
project_meta: Union[ProjectMeta, None] = None
|
||||
|
||||
@@ -24,7 +21,7 @@ def _load_yaml_file(yaml_file: Text) -> Dict:
|
||||
"""
|
||||
with open(yaml_file, mode="rb") as stream:
|
||||
try:
|
||||
yaml_content = yaml.load(stream, loader=FullLoader)
|
||||
yaml_content = yaml.load(stream, Loader=yaml.FullLoader)
|
||||
except yaml.YAMLError as ex:
|
||||
err_msg = f"YAMLError:\nfile: {yaml_file}\nerror: {ex}"
|
||||
logger.error(err_msg)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "httprunner"
|
||||
version = "3.1.7"
|
||||
version = "3.1.8-beta"
|
||||
description = "One-stop solution for HTTP(S) testing."
|
||||
license = "Apache-2.0"
|
||||
readme = "docs/README.md"
|
||||
|
||||
Reference in New Issue
Block a user