summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-10 13:38:09 +0700
committerVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-11 09:59:08 +0700
commite29067486a2cffc02fbb6cbc19f1f8e0534603bc (patch)
treebad9ae7d58b8b6bf164144919fc57c6f8a7a2747
parent234ea50d5dfa3c6b71c15d32223a2ddf84c1aa1e (diff)
downloadpython-keystoneclient-e29067486a2cffc02fbb6cbc19f1f8e0534603bc.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: I6484b605b1a7b8bcc4589170d2645f7cb0ca66f6
-rw-r--r--.gitignore2
-rw-r--r--.stestr.conf4
-rw-r--r--.testr.conf4
-rw-r--r--lower-constraints.txt3
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini12
6 files changed, 16 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 6b6f10d..f24746a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
.coverage
-.testrepository
+.stestr/
subunit.log
.venv
*,cover
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..73c0a51
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,4 @@
+[DEFAULT]
+test_path=${OS_TEST_PATH:-./keystoneclient/tests/unit}
+top_dir=./
+
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 3d3e1e6..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-test_command=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./keystoneclient/tests/unit} $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 766933b..885c615 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -64,10 +64,9 @@ requestsexceptions==1.2.0
rfc3986==0.3.1
six==1.10.0
smmap==0.9.0
-stestr==1.0.0
stevedore==1.20.0
tempest==17.1.0
-testrepository==0.0.18
+stestr==2.0.0
testresources==2.0.0
testscenarios==0.4
testtools==2.2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index bad9c18..92ffcf6 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -14,7 +14,7 @@ oauthlib>=0.6.2 # BSD
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testresources>=2.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
diff --git a/tox.ini b/tox.ini
index b8210d3..4fd17d3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = find . -type f -name "*.pyc" -delete
- python setup.py testr --slowest --testr-args='{posargs}'
+ stestr run --slowest {posargs}
whitelist_externals = find
[testenv:pep8]
@@ -36,8 +36,14 @@ commands = {posargs}
[testenv:cover]
basepython = python3
-commands = python setup.py testr --coverage --testr-args='{posargs}'
- coverage report
+setenv =
+ PYTHON=coverage run --source keystoneclient --parallel-mode
+commands =
+ stestr run '{posargs}'
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
+ coverage report
[testenv:debug]
basepython = python3