diff --git a/.gitignore b/.gitignore index c7a958cc3..09e7f8c38 100644 --- a/.gitignore +++ b/.gitignore @@ -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 000000000..f647476ac --- /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 893342560..000000000 --- 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 41f37a6f1..fe122dffe 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 b83e8aec1..fc704f34b 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 2f6805ab6..b334d6b1c 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 diff --git a/tox.ini b/tox.ini index 35f4cab4e..5696d9d65 100644 --- a/tox.ini +++ b/tox.ini @@ -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