Another bug fix for Python 3.x compatibility in test suite