PY3 Replace xrange by range in tests