Utilities for writing tests with Python