PyCon HK 2026 Logo
PyCon HK 2026

Property-Based Testing with Hypothesis

Featured talk · Hon Kwan Shun Quinson

About this session

When writing code, it is often good practice to write tests to ensure that the code is correct. Typically, these tests check the code one input at a time to see if the output is correct for each case. However, in practice, we want the code to work on a wide range of inputs, and it is sometimes impossible to test all cases. To mitigate this, property-based testing can be used to generate random but structured inputs to pass into the code, and the code can be tested on a much larger range of inputs to give developers better confidence that their code works. This talk will explain in more detail what property-based testing is, how to conduct property-based testing with the Hypothesis library, when it is useful and how it can be integrated into standard development workflows. Attendees will learn various property-based testing concepts and techniques to ensure that their inputs work on a wider range of scenarios.

About the speaker

Hon Kwan Shun Quinson

Hon Kwan Shun Quinson

Hon Kwan Shun Quinson is an M.Phil. student in Computer Science at The Chinese University of Hong Kong. His academic pursuits and research focus on the application of LLMs in software development, leveraging existing software tools to enhance the capability of AI agents in software development and general workflows.

Back to featured speakers