World Congress 2021 • Jun 29, 2021

pytest: Simple, rapid and fun testing with Python

Florian Bruhin

Ditch verbose unittest boilerplate for plain Python assertions. Pytest transforms your workflow with modular fixtures and a massive plugin ecosystem for scalable, maintainable test automation.

Pause
Mute Enter Fullscreen
#1 about 4 min

Discovering the importance of automated python testing

The transition from basic scripting to python highlights the necessity of automated testing for open-source projects.

#2 about 3 min

Overview of pytest fundamental testing features

An introduction to pytest's core capabilities demonstrates its versatility for syntax-light automation and cross-domain system testing.

#3 about 2 min

Historical origins and active project development of pytest

The historical evolution from the pypy project traces how pytest became a fully independent testing standard.

#4 about 5 min

Writing readable test assertions without boilerplate test classes

Replacing boilerplate test classes with standard assertions allows developers to extract detailed contexts instantly upon failure.

#5 about 4 min

Tagging and organizing execution scenarios with pytest markers

Using decorator markers allows teams to selectively skip, group, and tag tests across diverse functional requirements.

#6 about 4 min

Parameterizing test functions with different input datasets

Converting test loops into parameterized decorators isolates failure scenarios and cleanly supplies diverse data points.

#7 about 7 min

Managing setup and teardown code utilizing dependency-injected fixtures

Dependency-injected fixtures isolate setup routines into composable blocks rather than complex class inheritances or mixins.

#8 about 4 min

Handling files and overriding states via built-in fixtures

Built-in temporary directory handles and monkeypatching tools prevent conflicting states when managing files or environmental variables.

#9 about 6 min

Extending testing workflows using popular pytest plugins

Adding specialized community plugins supercharges test suites with code coverage generation, behavioral scenarios, and property-based variations.

#10 about 14 min

Next steps for migrating tests and upcoming framework releases

Migrating existing codebases with automated rewrite scripts paves the way for adopting upcoming major version capabilities.

Matching moments

1:33 min

Session summary and brief recap of learned testing concepts

Anna Mcdougall · JS Congress

1:18 min

Reflecting on the core motivations for writing tests

Daniel Afonso Daniel Afonso · World Congress 2025

1:29 min

Introduction to keeping test code clean

Gil Zilberfeld · LIVE

2:10 min

Building confidence with the test automation pyramid

Julian Richter Julian Richter · World Congress 2025

3:01 min

Exploring the expansion of end-to-end testing utility suites

Daniel Afonso Daniel Afonso · World Congress 2025

3:05 min

Shifting development challenges towards complex testing and team collaboration

Julia Wilson Julia Wilson +1 · World Congress 2025