Browse Source

Updated tests/utils.py

pull/30/head
Sheng 6 years ago
parent
commit
2adcf93362
  1. 3
      tests/utils.py

3
tests/utils.py

@ -41,7 +41,8 @@ def get_content_type(filename):
def read_file(path, encoding='utf-8'):
data = open(path, 'rb').read()
with open(path, 'rb') as f:
data = f.read()
if encoding is None:
return data
return data.decode(encoding)

Loading…
Cancel
Save