DeepRead
Cover of Python Testing with Pytest

Python Testing with Pytest

Brian Okken · 2022

Programming and computer science › Python

#10,970 most recommended

About the book

A practical guide to testing Python code with the pytest framework. It covers writing and running a first test, then organizing tests with fixtures, parametrization, and markers, using pytest's built-in fixtures, and working with plugins. It also touches on running pytest in larger projects and with related tools such as coverage and tox. The book makes the case that tests should be short, readable, and mostly free of boilerplate, and that pytest's plain assert statements and automatic failure reporting make this possible. It presents fixtures as a more flexible way to manage setup, teardown, and shared dependencies than class-based setup methods, and it claims that parametrization lets one test cover many inputs without duplication. It also argues that pytest's plugin ecosystem extends the framework without requiring changes to the tests themselves.

Written by Claude from what it knows of this book.

What Hacker News says 33% recommend · 0% critical

012201820192018 peak · 2
This bookAverage book in Python

In the commenters’ own words

What Open Library readers say

No Open Library reader has rated it yet.

  • 3 want to read
  • 0 reading
  • 0 have read

Open Library’s page for the book

What critics say, via Wikipedia

No Wikipedia article about this book yet, so no critics to quote.

Reddit communities — coming later

Details

First published
2022
ISBN
9781680508604
Editions known
2 at Open Library
Open Library
OL27411432W

Explore in the mosaic

Read next: its neighbours on the mosaic