mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-26 02:11:03 +00:00
8f424bf0d4
♻️ 重构插件系统 ⚙️ 重写插件 🎨 改进代码结构 📝 完善文档 Co-authored-by: zhxy-CN <admin@owo.cab> Co-authored-by: 洛水居室 <luoshuijs@outlook.com> Co-authored-by: xtaodada <xtao@xtaolink.cn> Co-authored-by: Li Chuangbo <im@chuangbo.li>
19 lines
504 B
Python
19 lines
504 B
Python
import os
|
|
import unittest
|
|
|
|
main_suite = unittest.TestSuite()
|
|
|
|
for parent, dirs, _ in os.walk("."):
|
|
for dirname in dirs:
|
|
if dirname == "__pycache__":
|
|
continue
|
|
discover = unittest.defaultTestLoader.discover(
|
|
start_dir=parent + os.sep + dirname, pattern='test_*.py',
|
|
top_level_dir=parent + os.sep + dirname)
|
|
main_suite.addTest(discover)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
runner = unittest.TextTestRunner(verbosity=2)
|
|
runner.run(main_suite)
|