diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..4da1d9c --- /dev/null +++ b/.testr.conf @@ -0,0 +1,8 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ + OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ + OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ + ${PYTHON:-python} -m subunit.run discover -t ./ ./hnv_client/tests $LISTOPT $IDOPTION + +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/.travis.yml b/.travis.yml index ef96102..467ca8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,3 +7,5 @@ env: - TOXENV=py27 - TOXENV=pep8 - TOXENV=pylint + - TOXENV=cover + - TOXENV=docs diff --git a/test-requirements.txt b/test-requirements.txt index d65b3c8..666905e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,13 +3,14 @@ # process, which may cause wedges in the gate later. hacking<0.11,>=0.10.0 - coverage>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0 # BSD +sphinx +oslosphinx python-subunit>=0.0.18 # Apache-2.0/BSD testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT nose -pylint \ No newline at end of file +pylint diff --git a/tox.ini b/tox.ini index e982601..8441d18 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt install_command = pip install -U --force-reinstall {opts} {packages} -commands = nosetests hnv_client/tests +commands = python setup.py testr --testr-args='{posargs}' [testenv:pep8] commands = flake8 hnv_client {posargs} @@ -19,9 +19,15 @@ deps = flake8 commands = pylint hnv_client --rcfile={toxinidir}/.pylintrc {posargs} deps = pylint +[testenv:cover] +commands = python setup.py testr --coverage --testr-args='{posargs}' + [testenv:venv] commands = {posargs} +[testenv:docs] +commands = python setup.py build_sphinx + [nosetests] verbosity = 1 detailed-errors = 1