© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
M. IndenPython Challengeshttps://doi.org/10.1007/978-1-4842-7398-2_11

Short Introduction to pytest

Michael Inden1  
(1)
Zurich, Switzerland
 

pytest is a framework written in Python that helps in creating and automating test cases. It is easy to learn and takes a lot of the work out of writing and managing test cases. In particular, only the logic for the test cases itself needs to be implemented. Unlike some other frameworks, there is no need to learn a large number of functions to set up test assertions; one is enough.

The module unittest, which is integrated in Python, is less easy to handle than pytest and therefore less common. Details about both can be found ...

Get Python Challenges: 100 Proven Programming Tasks Designed to Prepare You for Anything now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.