Preface

Automated tests are a very important tool in a developer's tool belt. Having a set of automated tests not only increases productivity and software quality; it also works as a safety net for developers and gives confidence in relation to code refactorings. Python comes with a standard unittest module that is used to write automated tests, but there's an alternative: pytest. The pytest framework is simple to get started with, and scales from simple unit tests all the way through to complex integration testing. It is considered by many to be truly Pythonic in its approach, with simple functions, plain asserts, fixtures, plugins, and a whole plethora of features. More and more developers are adopting a full testing approach, so why not use a framework that is both simple and powerful and considered by many to be a true joy to use?