/trasteando/

Playing around

Misadventures With Property-Based TDD: A Lesson Learned - by Nat Pryce @ Mistaeks I Hav Made

I’ve just read this post about TDD best practices & lessons learned: Mistaeks I Hav Made: Misadventures with Property-Based TDD: A Lesson Learned

Through a TDD example it reaches the following conclusion:

When working from examples, we start with specifics and then generalise, by adding contradictory examples. With property-based tests it seems better to start with very general properties and then specialise.

Interestingly the tests used in the example are based on factcheck

A simple but extensible implementation of QuickCheck for Python 2.7 and Python 3 that works well with Pytest.