Added self-test to PY2.