set default python to python3
Set the default python to python3 except for the py27 environment. We have to set that explicitly to override the new default. Because flake8 runs under python 3, where the type "long" has been merged into int(), we have to ignore the error from the undefined name in one of the tests. Change-Id: I86ae7f83d17724d74bae7102dd1775eceb82599d Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
6c757ed3b6
commit
151296d66b
@ -160,7 +160,7 @@ class TestString(TestField):
|
||||
self.coerce_good_values = [
|
||||
('foo', 'foo'), (1, '1'), (1.0, '1.0'), (True, 'True')]
|
||||
if six.PY2:
|
||||
self.coerce_good_values += [(long(1), '1')]
|
||||
self.coerce_good_values += [(long(1), '1')] # noqa
|
||||
self.coerce_bad_values = [None]
|
||||
self.to_primitive_values = self.coerce_good_values[0:1]
|
||||
self.from_primitive_values = self.coerce_good_values[0:1]
|
||||
|
5
tox.ini
5
tox.ini
@ -3,6 +3,7 @@ minversion = 2.0
|
||||
envlist = py35,py27,pep8
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
BRANCH_NAME=master
|
||||
@ -12,6 +13,9 @@ deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:py27]
|
||||
basepython = python2.7
|
||||
|
||||
[testenv:pep8]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
@ -54,7 +58,6 @@ deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user