Updated tests

This commit is contained in:
Sheng
2018-08-25 06:53:21 +08:00
parent 757702127a
commit f3d9d297bb
2 changed files with 102 additions and 71 deletions
+4 -1
View File
@@ -41,7 +41,10 @@ def get_content_type(filename):
def read_file(path, encoding='utf-8'):
return open(path, 'rb').read().decode(encoding)
data = open(path, 'rb').read()
if encoding is None:
return data
return data.decode(encoding)
def make_tests_data_path(filename):