A Practical Guide to Testing with Pytest, Faker, and Hypothesis
Speaker
Kader Miyanyedi
I have been a backend developer for 4 years, working primarily with Python and Django. I enjoy sharing what I’ve learned at previous PyCon talks and through writing on Medium, helping others improve their coding and AI skills.
Abstract
Writing tests is an important part of every project. In this talk, I will show how to improve your tests using Pytest, Faker, and Hypothesis.
We will start with Pytest, a simpler and more readable way to write tests. Then we’ll look at Faker, which helps create test data more easily. Finally, we’ll explore Hypothesis, a tool that generates random test cases to help find hidden bugs. You will leave this talk with clear examples and useful tips to write better tests in your projects using modern tools.
Description
Writing reliable tests is essential in any Python project, but creating realistic data and covering edge cases can be challenging. In this session, attendees will learn how to write maintainable tests with Pytest, generate realistic test data using Faker, and explore property-based testing with Hypothesis to automatically uncover hidden bugs.
By the end of the session, attendees will understand how to:
-
Write clear and maintainable tests using Pytest
-
Generate dynamic, realistic test data with Faker
-
Use Hypothesis to create property-based tests that explore edge cases
-
Combine these tools to build faster, more reliable, and data-driven testing workflows
This session gives Python developers practical techniques to improve test coverage, find unexpected bugs, and make testing a powerful part of their development process.