Compatibility with PY3 in testsuite