From 78ac4049c1a57dde09778fb6c3c9bf7a5e28322a Mon Sep 17 00:00:00 2001 From: httprunner Date: Thu, 17 Aug 2017 17:15:41 +0800 Subject: [PATCH] bugfix: open file with utf-8 encoding --- ate/__init__.py | 2 +- ate/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ate/__init__.py b/ate/__init__.py index 03174f4a..a8a1bf6e 100644 --- a/ate/__init__.py +++ b/ate/__init__.py @@ -1 +1 @@ -__version__ = '0.3.3' \ No newline at end of file +__version__ = '0.3.4' \ No newline at end of file diff --git a/ate/utils.py b/ate/utils.py index 9d6d6151..8ca075f2 100644 --- a/ate/utils.py +++ b/ate/utils.py @@ -32,11 +32,11 @@ def get_sign(*args): return sign def load_yaml_file(yaml_file): - with open(yaml_file, 'r+') as stream: + with open(yaml_file, 'r+', encoding='utf-8') as stream: return yaml.load(stream) def load_json_file(json_file): - with open(json_file) as data_file: + with open(json_file, encoding='utf-8') as data_file: return json.load(data_file) def load_testcases(testcase_file_path):