fix test failure under python 3.x