summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-10 14:11:30 +0700
committerVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-10 14:12:06 +0700
commit08d18090f402b14227f6a8fed48b3ea341783529 (patch)
treec63add034e61aca04c94b88e989e937da3a44de6
parent434d7da456a00fea81fa570872613228c3bf7c3f (diff)
downloadpython-barbicanclient-08d18090f402b14227f6a8fed48b3ea341783529.tar.gz
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: I3597edc56ac5115347baaf72af72b071976468e7
-rw-r--r--.gitignore2
-rw-r--r--.stestr.conf4
-rw-r--r--.testr.conf5
-rw-r--r--lower-constraints.txt2
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini6
6 files changed, 12 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index c49a2d4..5075ecf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,7 +25,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
-.testrepository
+.stestr/
flake8.log
cover
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..d4ba6b9
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,4 @@
+[DEFAULT]
+test_path=./barbicanclient/tests
+top_dir=./
+
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 3927088..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-test_command=${PYTHON:-python} -m subunit.run discover -s ./barbicanclient -t . $LISTOPT $IDOPTION
-
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 7876b87..9a616b8 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -65,7 +65,7 @@ rfc3986==0.3.1
simplejson==3.5.1
six==1.10.0
stevedore==1.20.0
-testrepository==0.0.18
+stestr==2.0.0
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 71f8127..0426a1e 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -6,7 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
requests-mock>=1.2.0 # Apache-2.0
mock>=2.0.0 # BSD
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
oslotest>=3.2.0 # Apache-2.0
nose>=1.3.7 # LGPL
diff --git a/tox.ini b/tox.ini
index 8c3f43c..a8b9d9f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,6 +7,7 @@ skipsdist = True
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
+ PYTHON=coverage run --source barbicanclient --parallel-mode
VIRTUAL_ENV={envdir}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@@ -16,7 +17,10 @@ deps =
commands =
rm -f .testrepository/times.dbm
coverage erase
- python setup.py testr --coverage --testr-args='{posargs}'
+ stestr run '{posargs}'
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
coverage report -m
[testenv:debug]