diff --git a/ate/utils.py b/ate/utils.py index 8ca075f2..093df3a8 100644 --- a/ate/utils.py +++ b/ate/utils.py @@ -1,3 +1,4 @@ +import codecs import hashlib import hmac import json @@ -5,8 +6,8 @@ import os.path import random import re import string - import yaml + from ate import exception try: @@ -32,11 +33,11 @@ def get_sign(*args): return sign def load_yaml_file(yaml_file): - with open(yaml_file, 'r+', encoding='utf-8') as stream: + with codecs.open(yaml_file, 'r+', encoding='utf-8') as stream: return yaml.load(stream) def load_json_file(json_file): - with open(json_file, encoding='utf-8') as data_file: + with codecs.open(json_file, encoding='utf-8') as data_file: return json.load(data_file) def load_testcases(testcase_file_path):