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

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

最近看flask的源码,发现项目下一个tests文件夹下里面都是测试相关的代码,但是我在这个文件夹所有py文件中都没有找打main入口,不知道要怎样才能把这些测试用例运行起来?


~ 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.

【热门文章】
【热门文章】