make tests compatible with Python 3