From eb2ab2ba530d8d107da81427936bd02cecda8a31 Mon Sep 17 00:00:00 2001 From: Maciej Kucia Date: Sun, 30 Oct 2016 20:51:54 +0100 Subject: [PATCH] Use ostestr instead of nosetest This change aligns packstack unit tests runner with other Open Stack projects Change-Id: I588f12a163e64d90a51f35e98ea20ff691339baa Signed-off-by: Maciej Kucia --- .gitignore | 1 + .testr.conf | 4 ++++ tools/test-requires | 2 +- tox.ini | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index c1d5b41da..e7b762cd4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.swp *.log .tox +.testrepository/ vendor/* Gemfile.lock packstack.egg-info diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 000000000..081907d59 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/tools/test-requires b/tools/test-requires index 11fa6bf95..321a808bc 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -1,4 +1,4 @@ -nose +os-testr>=0.4.1 # Apache-2.0 coverage hacking>=0.9.5,<0.10 netaddr diff --git a/tox.ini b/tox.ini index 8de06f912..e71b4eea1 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,8 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/tools/pip-requires -r{toxinidir}/tools/test-requires -commands = nosetests {posargs} +commands = /usr/bin/find . -type f -name "*.pyc" -delete + ostestr {posargs} [tox:jenkins] sitepackages = True