This is the website for an older EuroPython. Looking for the latest EuroPython? Click here!
Skip to main content

Bulletproof Python – Writing fewer tests with a typed code base

south hall 2b
30 minutes


A fully typed code base requires less test code to achieve the same level of confidence in its correctness. We'll analyze specific code examples and see how dependent types and exhaustiveness checking make certain classes of tests obsolete.

TalkSoftware Engineering & Architecture


A type system forms a set of rules that is imposed on a programming language with the goal to avoid invalid operations. Type checking Python code is particularly interesting, because it happens before running the code or the test code. This allows software engineers to perform checks on the source code that otherwise would have to be performed at runtime.

The typing module in the Python standard library provides powerful concepts to provide hints to the type checker. Specifically, we'll look at use cases for NewType, dependent functions, and exhaustiveness checking.

Audience members are expected to be able to read and understand Python code and have a basic understanding of unit testing.

The speaker

Michael Seifert

Michael Seifert

Michael is a consulting software engineer and trainer who helps product teams to develop Python software in the cloud. He enjoys deleting code more than writing it and is constantly looking for ways to make software easier to maintain.

← Back to schedule