It's tricky to test printing to stdout both in Python 2 and Python 3