fix test.py for python3