Fix test coverage for Python 3