Python pytest单元测试框架入门与实战
Python pytest框架简单易读,适用于编写小型单元测试和复杂的功能测试。需要Python 3.7+或PyPy3支持。PyPI软件包名称:pytest。举例说明:#测试样本.py文件的内容 def inc(x): return x + 1 def test_answer(): assert inc(3) == 5 执行它:$ pytest === test session starts ==== platform linux -- Python 3.x.y,pytest-7.x.y,pluggy-1.x.y
下载地址
用户评论