diff options
author | Ha Manh Dong <donghm@vn.fujitsu.com> | 2018-07-20 13:38:36 +0700 |
---|---|---|
committer | Doug Hellmann <doug@doughellmann.com> | 2018-08-13 16:20:18 -0400 |
commit | a11c88a30374e0efe5b45c4f7d9e41b635330875 (patch) | |
tree | 931a41771ff03536ed5d355595910ab8a06b56da | |
parent | 349f79937f681bc3da3c9c3b545c5714968c15f4 (diff) | |
download | taskflow-a11c88a30374e0efe5b45c4f7d9e41b635330875.tar.gz |
Switch to use stestr for unit test
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
So we should switch to stestr.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Depends-On: https://review.openstack.org/#/c/589728/
Change-Id: I943a73e22eb23bd52c3a96e75c98b88665474e67
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .stestr.conf | 3 | ||||
-rw-r--r-- | .testr.conf | 11 | ||||
-rw-r--r-- | lower-constraints.txt | 2 | ||||
-rw-r--r-- | requirements.txt | 3 | ||||
-rw-r--r-- | test-requirements.txt | 2 | ||||
-rw-r--r-- | tox.ini | 11 |
7 files changed, 18 insertions, 16 deletions
@@ -28,7 +28,7 @@ pip-log.txt nosetests.xml .venv cover -.testrepository +.stestr/ htmlcov # Translations diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..f647476 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./taskflow/tests/unit +top_dir=. diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 8933425..0000000 --- a/.testr.conf +++ /dev/null @@ -1,11 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ - OS_DEBUG=${OS_DEBUG:-TRACE} \ - OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ./taskflow/tests $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list - diff --git a/lower-constraints.txt b/lower-constraints.txt index 41f37a6..fe122df 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -70,7 +70,7 @@ SQLAlchemy-Utils==0.30.11 SQLAlchemy==1.0.10 stevedore==1.20.0 tenacity==4.4.0 -testrepository==0.0.18 +stestr==2.0.0 testscenarios==0.4 testtools==2.2.0 traceback2==1.4.0 diff --git a/requirements.txt b/requirements.txt index b83e8ae..fc704f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -47,3 +47,6 @@ cachetools>=2.0.0 # MIT License # For deprecation of things debtcollector>=1.2.0 # Apache-2.0 + +# For stestr +stestr>=2.0.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 2f6805a..b334d6b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -29,6 +29,6 @@ oslotest>=3.2.0 # Apache-2.0 mock>=2.0.0 # BSD testtools>=2.2.0 # MIT testscenarios>=0.4 # Apache-2.0/BSD -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD @@ -21,7 +21,7 @@ deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = - python setup.py testr --slowest --testr-args='{posargs}' + stestr run {posargs} [testenv:docs] basepython = python3 @@ -56,7 +56,14 @@ basepython = python3 deps = {[testenv]deps} coverage>=3.6 -commands = python setup.py testr --coverage --testr-args='{posargs}' +setenv = + {[testenv]setenv} + PYTHON=coverage run --source taskflow --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:venv] basepython = python3 |