The entire industry approves of unit testing but almost no one can fully agree on how to do it correctly, or even on what unit tests are. I’ll show you how testing turns into hell in real enterprises with the most common anti-patterns and propose solutions for all of them
Similar to TDD, unit tests are one of the most misunderstood concepts in software engineering. In this session, I will cover the most important fallacies about unit testing and the most common anti-patterns. I will also show you how modern infrastructure (pytest-fixture-classes, inline-snapshot, dirty-equals, import-linter, mutmut, and pytest-xdist) makes it possible to avoid most of them.
We will discuss that the real goal of tests is not always stability and how tests often make refactoring and restructuring your project easy, not hard. I will define my criteria for good tests and then for the rest of the session, we will be using it to analyze anti-patterns and explore modern solutions to them. You will see:
After this session, your tests will become your friend instead of slowing you down.
I’m an experienced platform engineer and architect with a passion for open source and developer tools. The author of Cadwyn – a sophisticated API Versioning framework based on FastAPI. A contributor to numerous projects such as CPython and tortoise-orm. Currently building the future of finance at Monite.