mirror of
https://kkgithub.com/chinese-poetry/chinese-poetry.git
synced 2026-04-12 21:37:19 +00:00
[UPDATE] 修复单元测试BUG
This commit is contained in:
@@ -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():
|
||||||
|
|||||||
Reference in New Issue
Block a user