TST Use public interfaces in tests
PY3 Compilation fix for Python 3