Contribute Media
A thank you to everyone who makes this possible: Read More

Tests without boilerplate

Description

Presented by: Jonathan Fine

This talk is about a new way of writing tests.

We arrange matters so that the expression statement add(2, 2) == 4 reports a test failure if add(2, 2) does not return 4.

Similarly add(2, '2') ** TypeError reports a test failure if add(2, '2') does not raise a TypeError exception.

These new semantics (which provide no-boilerplate testing) do not apply when comparison expressions are used in conditional statements etc.

I will demonstrate Python software that implements this, and will discuss with you the use, benefits and development of this new approach to writing tests.

Details

Improve this page