Python Testing with pytest

作者: BrianOkken
 评分: 0.0   分类: 自动化测试 

For Python-based projects, pytest is the undeniable choice to test your code if you’re looking for a full-featured, API-independent, flexible, and extensible testing framework. With a full-bodied fixture model that is unmatched in any other tool, the pytest framework gives you powerful features such as assert rewriting and plug-in capability—with no boilerplate code.

With simple step-by-step instructions and sample code, this book gets you up to speed quickly on this easy-to-learn and robust tool. Write short, maintainable tests that elegantly express what you’re testing. Add powerful testing features and still speed up test times by distributing tests across multiple processors and running tests in parallel. Use the built-in assert statements to reduce false test failures by separating setup and test failures. Test error conditions and corner cases with expected exception testing, and use one test to run many test cases with parameterized testing. Extend pytest with plugins, connect it to continuous integration systems, and use it in tandem with tox, mock, coverage, unittest, and doctest.

Write simple, maintainable tests that elegantly express what you’re testing and why.

出版社: ThePragmaticBookshelf
豆瓣链接: 点击访问
出版年: 2017-9-13
资源提供: root
页数: 220
文件大小: 4.61MB
ISBN: 9781680502404
下载次数: 22
副标题: Simple,Rapid,Effective,andScalable

Copyright © 2024.Copyright Itbox All Rights Reserved.
免责声明:本站所有的书籍资源皆收集于互联网,仅供学习交流,严禁用于商业用途,并请于下载后24小时内删除。 若发布的内容侵犯到您的权益,请及时联系邮箱mcystory@126.com,我们将在第一时间处理。