diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a6aa377..36611042 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - fix extend with testcase reference in format version 2 - fix ImportError when locustio is not installed +- fix YAMLLoadWarning by specify yaml loader ## 2.2.0 (2019-06-24) diff --git a/httprunner/loader.py b/httprunner/loader.py index 8f1aadb7..bd346d42 100644 --- a/httprunner/loader.py +++ b/httprunner/loader.py @@ -35,7 +35,7 @@ def load_yaml_file(yaml_file): """ load yaml file and check file content format """ with io.open(yaml_file, 'r', encoding='utf-8') as stream: - yaml_content = yaml.load(stream) + yaml_content = yaml.load(stream, Loader=yaml.FullLoader) _check_format(yaml_file, yaml_content) return yaml_content