Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想完全自定义测试结果输出。在unittest我可以通过unittest.TextTestRunner. 我怎样才能做到这一点pytest?
unittest
unittest.TextTestRunner
pytest
您需要使用pytest 钩子:
py.test 调用钩子函数来实现初始化、运行、测试执行和报告。
另见: