From 9ff5dc6ecc18e16e71dd43d0667b529ca9cf8afd Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Thu, 25 Feb 2016 11:02:07 -0500 Subject: [PATCH] Add test infrastructure --- requirements.txt | 5 +++++ test-requirements.txt | 8 ++++++++ tox.ini | 29 +++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 requirements.txt create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d7f3fb3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +PyYAML>=3.1.0 + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..3af44d7 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,8 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +coverage>=3.6 +mock>=1.2 +flake8>=2.2.4,<=2.4.1 +os-testr>=0.4.1 +charm-tools diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e8bf7cf --- /dev/null +++ b/tox.ini @@ -0,0 +1,29 @@ +[tox] +envlist = pep8,py27 +skipsdist = True + +[testenv] +setenv = VIRTUAL_ENV={envdir} + PYTHONHASHSEED=0 +install_command = + pip install --allow-unverified python-apt {opts} {packages} +commands = ostestr {posargs} + +[testenv:py27] +basepython = python2.7 +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +[testenv:pep8] +basepython = python2.7 +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = flake8 {posargs} hooks unit_tests tests + charm proof + +[testenv:venv] +commands = {posargs} + +[flake8] +ignore = E402,E226 +exclude = hooks/charmhelpers