Books

Books : reviews

Brian Okken.
Python Testing with pytest: simple, rapid, effective, and scalable.
Pragmatic Bookshel. 2017

Write expressive, elegant, and readable Python tests with pytest. The pytest testing framework helps you write tests quickly and keep them readable and maintainable—with no boilerplate code. Write small tests easily, and scale up to testing modules, packages, and applications with pytest’s robust fixture model.

Get up to speed quickly on this powerful tool with step-by-step instructions and sample code. Speed up test times by distributing tests across multiple processors. 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.