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.
This brings under one cover many aspect of pytest: how to write, name and run tests, testing packages, using fixtures for setup and tear down, writing parameterised tests, configuration files, using with other tools, and more. A useful initial guide and later reference.