blob: c81582ce91be2d6d28d23b88d4a9ed22a2078735 [file] [log] [blame]
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05001[tox]
2minversion = 2.0
qingszhaoaee506f2018-06-12 10:36:26 +08003envlist = py3,py27,pep8
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05004skipsdist = True
5
6[testenv]
7usedevelop = True
zhulingjie948256c2019-04-23 16:59:45 +08008install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05009setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
12deps = -r{toxinidir}/test-requirements.txt
13commands = python setup.py test --slowest --testr-args='{posargs}'
14
15[testenv:pep8]
qingszhaoaee506f2018-06-12 10:36:26 +080016basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050017commands = flake8 {posargs}
18
19[testenv:venv]
qingszhaoaee506f2018-06-12 10:36:26 +080020basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050021commands = {posargs}
22
23[testenv:cover]
qingszhaoaee506f2018-06-12 10:36:26 +080024basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050025commands = python setup.py test --coverage --testr-args='{posargs}'
26
27[testenv:docs]
qingszhaoaee506f2018-06-12 10:36:26 +080028basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050029commands = python setup.py build_sphinx
30
Kaifeng Wang6f4e2a32019-06-14 17:43:14 +080031[testenv:pdf-docs]
32basepython = python3
33whitelist_externals = make
34commands = sphinx-build -b latex doc/source doc/build/pdf
35 make -C doc/build/pdf
36
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050037[testenv:debug]
qingszhaoaee506f2018-06-12 10:36:26 +080038basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050039commands = oslo_debug_helper {posargs}
40
41[flake8]
John L. Villalovosd22378d2017-08-01 14:47:54 -070042ignore = E129
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050043
44show-source = True
45builtins = _
46exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build