为了账号安全,请及时绑定邮箱和手机立即绑定

如何运行Flask源码中的测试用例

如何运行Flask源码中的测试用例

墨色风雨 2018-10-11 08:20:29
最近看flask的源码,发现项目下一个tests文件夹下里面都是测试相关的代码,但是我在这个文件夹所有py文件中都没有找打main入口,不知道要怎样才能把这些测试用例运行起来?
查看完整描述

1 回答

?
largeQ

TA贡献2039条经验 获得超7个赞

~ Where are the tests?

Good that you're asking. The tests are in the
tests/ folder. To run the tests use the
py.test testing tool:

$ py.test

通过 pip 安装 pytest, 然后在运行 py.test.


查看完整回答
反对 回复 2018-10-21
  • 1 回答
  • 0 关注
  • 818 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信