Skip to content

ber2/pybcn-meetup-pbt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pybcn-meetup-pbt

Code examples for my talk, Property-based testing with Hypothesis, at the PyBCN Meetup on 2021-11-25.

Property-based testing is introduced and discussed in the context of Test-Driven Development, and Hypothesis is introduced as one of the leading packages for property-based testing in python.

Then we discuss an exercise about writing a program using TDD and testing it using Hypothesis. The code for that exercise is contained here.

Running the code

You will need to install both hypothesis and pytest. I originally wrote the code in Python 3.9, but I reckon anything newer than 3.6 should most probably work (lemme know by opening an issue if that is the case).

pip install pytest hypothesis
pytest -v

Using poetry

If you use poetry, I have provided my pyproject.toml and poetry.lock. On an environment with Python 3.9:

poetry install
pytest -v

About

Code examples for the PyBCN Meetup on 2021-11-25

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages