Make tests pass under Python 3