2013-08-29 11:31:50 +09:00
|
|
|
[tox]
|
2018-08-01 14:35:19 +09:00
|
|
|
envlist = py27,py34,py35,py36,py37,pypy,pycodestyle,autopep8
|
2013-08-29 11:31:50 +09:00
|
|
|
|
|
|
|
[testenv]
|
2016-12-13 11:58:57 +09:00
|
|
|
deps =
|
|
|
|
-U
|
|
|
|
-r{toxinidir}/tools/pip-requires
|
|
|
|
--no-cache-dir
|
2015-06-20 00:10:23 +09:00
|
|
|
usedevelop = True
|
2015-09-17 16:28:48 +09:00
|
|
|
passenv= NOSE_VERBOSE
|
2016-12-13 11:58:57 +09:00
|
|
|
# Note: To check whether tools/pip-requires satisfies the requirements
|
|
|
|
# for running Ryu, the following runs ryu-manager berfore installing
|
|
|
|
# the addtional requirements.
|
2013-08-29 11:31:50 +09:00
|
|
|
commands =
|
2017-06-30 14:23:03 +09:00
|
|
|
ryu-manager ryu/tests/unit/cmd/dummy_openflow_app.py
|
2016-12-13 11:58:57 +09:00
|
|
|
pip install -r{toxinidir}/tools/optional-requires -r{toxinidir}/tools/test-requires
|
2017-06-30 14:23:03 +09:00
|
|
|
coverage run --source=ryu ryu/tests/run_tests.py '{posargs}'
|
2016-11-01 17:16:14 +09:00
|
|
|
|
|
|
|
[testenv:scenario]
|
|
|
|
commands =
|
2017-06-30 14:23:03 +09:00
|
|
|
python ryu/tests/integrated/run_test.py
|
2014-05-13 19:05:33 +09:00
|
|
|
|
2016-11-01 17:16:14 +09:00
|
|
|
[testenv:py27]
|
|
|
|
commands =
|
|
|
|
{[testenv]commands}
|
|
|
|
{[testenv:scenario]commands}
|
|
|
|
|
2018-08-01 14:35:19 +09:00
|
|
|
[testenv:py36]
|
2016-11-01 17:16:14 +09:00
|
|
|
commands =
|
|
|
|
{[testenv]commands}
|
|
|
|
{[testenv:scenario]commands}
|
|
|
|
|
2017-12-15 10:50:14 +09:00
|
|
|
[testenv:pycodestyle]
|
2016-12-13 11:58:57 +09:00
|
|
|
deps =
|
|
|
|
-U
|
|
|
|
--no-cache-dir
|
2017-12-15 10:50:14 +09:00
|
|
|
pycodestyle
|
2014-10-14 10:34:55 +09:00
|
|
|
commands =
|
2017-12-15 10:50:14 +09:00
|
|
|
pycodestyle
|
2014-10-14 10:34:55 +09:00
|
|
|
|
2017-12-15 10:50:16 +09:00
|
|
|
[testenv:autopep8]
|
|
|
|
# If some errors displayed with this test, please reformat codes with the
|
|
|
|
# following command first.
|
|
|
|
# $ autopep8 --recursive --in-place ryu/
|
|
|
|
whitelist_externals=bash
|
|
|
|
deps =
|
|
|
|
-U
|
|
|
|
--no-cache-dir
|
|
|
|
autopep8
|
|
|
|
commands =
|
|
|
|
bash -c 'test -z "$(autopep8 --recursive --diff ryu/)"'
|
|
|
|
|
2017-12-15 10:50:14 +09:00
|
|
|
[pycodestyle]
|
|
|
|
exclude = pbr-*,.venv,.tox,.git,doc,dist,tools,vcsversion.py,.pyc,ryu/contrib
|
2018-06-13 15:57:30 +09:00
|
|
|
# W503: line break before binary operator
|
|
|
|
# W504: line break after binary operator
|
2017-12-15 10:50:14 +09:00
|
|
|
# E116: unexpected indentation (comment)
|
|
|
|
# E402: module level import not at top of file
|
|
|
|
# E501: line too long (>79 characters)
|
|
|
|
# E722: do not use bare except, specify exception instead
|
|
|
|
# E731: do not assign a lambda expression, use a def
|
|
|
|
# E741: do not use variables named 'l', 'O', or 'I'
|
2018-06-13 15:57:30 +09:00
|
|
|
ignore = W503,W504,E116,E402,E501,E722,E731,E741
|
2015-02-08 12:31:56 +09:00
|
|
|
|
2017-12-15 10:50:14 +09:00
|
|
|
[pep8]
|
|
|
|
exclude = pbr-*,.venv,.tox,.git,doc,dist,tools,vcsversion.py,.pyc,ryu/contrib
|
|
|
|
ignore = W503,E116,E402,E501,E722,E731,E741
|