Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Press enter or click to view image in full size
Photo by Kevin Ku on Unsplash

Automating Unit Tests in Python with Hypothesis

7 min readAug 30, 2020

--

Using a dataclass and Hypothesis to define your data strategies
Defining your testing module using Hypothesis
Using Hypothesis settings for property-based testing of Python code
A simple percentile function
Defining a composite strategy in Hypothesis
Example of a testing module that uses a composite strategy

--

--

TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Niels G.

Written by Niels G.

Product Manager & Data Scientist | PhD in Politics, @Oxford_University | Python, R, AWS, ML | EdTech | 🎷Jazz enthusiast | https://medium.com/@ndgoet/membership

Responses (4)