git-review/tox.ini
Sorin Sbarnea 514958d3f3 Switch from testrepository to stestr
Adopts use of newer stestr for running the test suite.

Passing TERM is needed or stestr will ignore the --color option when
run under tox.

Change-Id: Id2d4ce36cdfedd5a847e0428854753d2cf4140ee
2019-02-12 09:58:46 +00:00

41 lines
1008 B
INI

[tox]
envlist = pep8,docs,py27,py3{4,5,6,7}
[testenv]
# See "testing behind a proxy"
# @ https://review.openstack.org/#/q/I764ed51314c8e2d0572d1f0
passenv =
http_proxy
https_proxy
# avoids potential slip-over of java 1.9 which breaks Gerrit, without it
# Gerrit may start with incompatible java version.
JAVA_HOME
# uncomment to allow custom java options to be added
# _JAVA_OPTIONS
TERM
commands =
python -m git_review.tests.check_test_id_hashes discover --list
python -m git_review.tests.prepare
stestr run --color {posargs}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
commands = flake8
[testenv:docs]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E125,H202,H405,H904
show-source = True
exclude = .venv,.git,.tox,dist,doc,releasenotes,*lib/python*,*egg,build