From fc53013471e08288d12cd0539c46d58a2de61bac Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 10 Jul 2018 17:09:15 +0700 Subject: [PATCH] Switch to stestr According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: I739cd53efa4f685d721dc4c9095d5df273b2acae --- .gitignore | 2 +- .stestr.conf | 4 ++++ test-requirements.txt | 1 + tox.ini | 8 +++++++- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .stestr.conf diff --git a/.gitignore b/.gitignore index 4d67f94..f76ebcd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ pip-log.txt # Unit test / coverage reports .coverage .tox -nosetests.xml +.stestr/ # Translations *.mo diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..dde99d4 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./mistraldashboard/tests +top_dir=./ + diff --git a/test-requirements.txt b/test-requirements.txt index 90eaf85..5249d20 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,6 +11,7 @@ mock>=2.0.0 # BSD nodeenv>=0.9.4 # BSD selenium>=2.50.1 # Apache-2.0 xvfbwrapper>=0.1.3 #license: MIT +stestr>=2.0.0 # Apache-2.0 # Docs Requirements sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD diff --git a/tox.ini b/tox.ini index ad78d7a..4163028 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,13 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = python setup.py testr --coverage --testr-args='{posargs}' +setenv = + PYTHON=coverage run --source mistraldashboard --parallel-mode +commands = + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] basepython = python3