From 032fe270a600cb8917cd9c81730a18cd0fee6e61 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 30 Mar 2017 19:26:06 +0800 Subject: add tox framework for pep8 and unittest Change-Id: If783d387c29dad7fa472578ead2bcd5a6d42ee70 Signed-off-by: SerenaFeng --- tox.ini | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tox.ini (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..28fbf8f5 --- /dev/null +++ b/tox.ini @@ -0,0 +1,42 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py27,pep8 +skipsdist = True + +[testenv] +usedevelop = True +install_command = pip install -U {opts} {packages} +deps = + -rrequirements.txt + -rtest-requirements.txt +commands= + py.test \ + --basetemp={envtmpdir} \ + --cov \ + --cov-report term-missing \ + --cov-report xml \ + {posargs} +setenv= + HOME = {envtmpdir} + PYTHONPATH = {toxinidir} + +[testenv:pep8] +deps = flake8 +commands = flake8 {toxinidir} + +[flake8] +# H803 skipped on purpose per list discussion. +# E123, E125 skipped as they are invalid PEP-8. + +show-source = True +ignore = E123,E125,H803,E501 +builtins = _ +exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv + +[pytest] +testpaths = tests +python_functions = test_* -- cgit 1.2.3-korg