Fix test failure on Python3.