[UPDATE] 修复单元测试BUG

This commit is contained in:
高俊奇
2017-05-26 09:51:30 +08:00
parent 001ec8d35e
commit 0d4fc183a2

View File

@@ -7,14 +7,14 @@
import os, json import os, json
def check_json(json): def check_json(f):
filepath = os.path.join('./json', json) filepath = os.path.join('./json', f)
with open(filepath) as file: with open(filepath) as file:
try: try:
_ = json.loads(file.read()) _ = json.loads(file.read())
return True return True
except: except:
assert False, "校验(%s)失败" % json assert False, "校验(%s)失败" % f
def test_json(): def test_json():