tests/util: import xrange polyfill from six