make unit tests pass under python 3