fix test fail on Python 2.6