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

Upcoming sessions on this topic

Open session

World Congress 2026 North America

September 25, 2026 · 13:30–14:00

Stage 7

Agents Can't Iterate Against Tests That Lie

Rocky Warren

Senior Staff Software Engineer at Clipboard

Rocky Warren
Open session

World Congress 2026 North America

September 24, 2026 · 14:10–14:40

Stage 9

One Repo, One Strategy: Scalable Full-Stack Testing in a Monorepo World

Bartosz Leczycki, Paweł Matynia

Bartosz Leczycki
Paweł Matynia
Open session

World Congress 2026 North America

September 25, 2026 · 10:20–10:50

Stage 9

Testing React Backends Like a Pro: Mocking Databases with SQLite

David Morris

Solution Architect at Leidos

David Morris
Open session

World Congress 2026 North America

September 25, 2026 · 11:40–12:10

Stage 2

Reinventing Testing Practices in the AI Era

Eric Deandrea

Java Champion & Senior Principal Software Engineer at IBM

Eric Deandrea
Open session

World Congress 2026 North America

September 24, 2026 · 10:20–10:50

Stage 6

Practices, Not Prompts: Scale GitHub Copilot with AI-Ready Repositories

Luis Pujols

Staff Customer Success Architect, GitHub

Luis Pujols
Open session

World Congress 2026 North America

September 24, 2026 · 13:30–15:30

Stage 12

GitHub Actions

Austen Stone

Senior Field Actions Specialist, GitHub

Austen Stone