nova/nova/tests/unit/api/openstack
Victor Stinner b259659a22 Use six.moves.range for Python 3
The function xrange() was renamed to range() in Python 3.

Use "from six.moves import range" to get xrange() on Python 2 and range() on
Python 3 as the name "range", and replace "xrange()" with "range()".

The import is omitted for small ranges (1024 items or less).

This patch was generated by the following tool (revision 0c1d096b3903)
with the "xrange" operation:
https://bitbucket.org/haypo/misc/src/tip/python/sixer.py

Manual change:

* Replace range(n) with list(range(n)) in a loop of
  nova/virt/libvirt/driver.py which uses list.pop()

Blueprint nova-python3
Change-Id: Iceda35cace04cc8ddc6adbd59df4613b22b39793
2015-05-20 15:19:51 -07:00
..
compute Use six.moves.range for Python 3 2015-05-20 15:19:51 -07:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
common.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
fakes.py Use six.moves.range for Python 3 2015-05-20 15:19:51 -07:00
test_api_version_request.py Adds global API version check for microversions 2014-12-05 09:55:37 +08:00
test_common.py Make unit tests inherit from test.NoDBTestCase 2015-03-06 09:46:31 +02:00
test_faults.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
test_mapper.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_wsgi.py Use six.moves.range for Python 3 2015-05-20 15:19:51 -07:00