1 Star 0 Fork 58

季先生 / xnote

forked from xupingmao / xnote 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run_test.py 661 Bytes
一键复制 编辑 原始数据 按行查看 历史
xupingmao 提交于 2018-01-08 21:49 . 整理代码
# encoding=utf-8
import os
import sys
sys.path.insert(1, "lib")
import unittest
# class test_1(unittest.TestCase):
# def test_1(self):
# print("hello")
# self.assertEqual(0, 0)
def run_test(path = "tests"):
for file in os.listdir(path):
if file.endswith(".py"):
print("run", file)
basename, ext = os.path.splitext(file)
mod = __import__("tests."+basename, fromlist=1,level=0)
suite = unittest.TestLoader().loadTestsFromTestCase(mod.TestMain)
unittest.TextTestRunner(verbosity=2).run(suite)
if __name__ == "__main__":
run_test()
# unittest.main()
Python
1
https://gitee.com/jcc1/xnote.git
git@gitee.com:jcc1/xnote.git
jcc1
xnote
xnote
master

搜索帮助