Python 3 fix for tests-only