mirror of
https://kkgithub.com/chinese-poetry/chinese-poetry.git
synced 2026-04-12 17:47:19 +00:00
test: support mengxue
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
#! -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# import sqlite3
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
@@ -15,11 +14,11 @@ def check_json(f, _dir):
|
|||||||
with open(filepath) as file:
|
with open(filepath) as file:
|
||||||
try:
|
try:
|
||||||
_ = json.loads(file.read())
|
_ = json.loads(file.read())
|
||||||
print(u"%s 校验成功" % _dir)
|
sys.stdout.write(f"{filepath} 校验成功")
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
sys.stderr.write(traceback.format_exc())
|
sys.stderr.write(traceback.format_exc())
|
||||||
assert False, u"校验(%s)失败" % f
|
assert False, f"{filepath} 校验失败"
|
||||||
|
|
||||||
|
|
||||||
def __check_path__(path):
|
def __check_path__(path):
|
||||||
@@ -44,3 +43,6 @@ test_youmengying = functools.partial(__check_path__, u'./youmengying/')
|
|||||||
test_sishuwujing = functools.partial(__check_path__, u'./sishuwujing/')
|
test_sishuwujing = functools.partial(__check_path__, u'./sishuwujing/')
|
||||||
|
|
||||||
test_yuanqu = functools.partial(__check_path__, u'./yuanqu/')
|
test_yuanqu = functools.partial(__check_path__, u'./yuanqu/')
|
||||||
|
|
||||||
|
test_mengxue = functools.partial(__check_path__, u'./mengxue')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user