fix test for Python 3.x