Advices from Simon Willison (2020-02-11)

Extract

I’ve used this technique to write many of the tests in both Datasette and sqlite-utils , and those are by far the best tested pieces of software I’ve ever released .

I started doing this around two years ago, and I’ve held off writing about it until I was confident I understood the downsides.

I haven’t found any yet: I end up with a robust, comprehensive test suite and it takes me less than half the time to write the tests than if I’d been hand-crafting all of those comparisons from scratch.