Use Python 3.x by default for testing

This requires updating newer hacking which requires
some small fixes for pep8 to pass. Also adjust sphinx
dependencies so that py2.7 environment continues to work.

Change-Id: I576a6c42867a3fed7cc7090bd4a6219de3bced66
This commit is contained in:
Dirk Mueller 2019-06-26 15:30:16 +02:00
parent 88850a55ec
commit 09218a7621
3 changed files with 7 additions and 4 deletions

View File

@ -658,8 +658,8 @@ def _cmp_segment(l_str, r_str):
while (r_offset < len(r_str)) or (l_offset < len(l_str)):
r_char = r_str[r_offset:r_offset + 1]
l_char = l_str[l_offset:l_offset + 1]
if ((not r_char or r_char.isdigit())
and (not l_char or l_char.isdigit())):
if ((not r_char or r_char.isdigit()) and
(not l_char or l_char.isdigit())):
l_int, l_offset = _find_int(l_str, l_offset)
r_int, r_offset = _find_int(r_str, r_offset)
diff = l_int - r_int

View File

@ -1,4 +1,4 @@
hacking>=0.10.0,<0.11
hacking
coverage>=3.6
fixtures>=0.3.12
@ -6,6 +6,7 @@ mock>=2.0 # BSD
python-subunit
testrepository>=0.0.13
testtools>=0.9.27
sphinx>1.6.1 # BSD
sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD
openstackdocstheme>=1.24.1 # Apache-2.0
sphinxcontrib-programoutput # BSD license

View File

@ -1,9 +1,11 @@
[tox]
envlist = py35,py27,pypy,pep8
skipdist = True
ignore_basepython_conflict=true
[testenv]
usedevelop = True
basepython = python3
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt