diff --git a/.gitignore b/.gitignore index 963e589..59acfbd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ *.py[cod] -# C extensions -*.so - # Packages *.egg* *.egg-info @@ -18,30 +15,14 @@ develop-eggs lib lib64 -# Installer logs -pip-log.txt - # Unit test / coverage reports cover/ .coverage* !.coveragerc .tox -nosetests.xml -.testrepository +.stestr .venv -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Complexity -output/*.html -output/*/index.html - # Sphinx doc/build @@ -49,10 +30,5 @@ doc/build AUTHORS ChangeLog -# Editors -*~ -.*.swp -.*sw? - # Files created by releasenotes build -releasenotes/build \ No newline at end of file +releasenotes/build diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..8d03eb4 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./sphinx_feature_classification/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 6d83b3c..0000000 --- a/.testr.conf +++ /dev/null @@ -1,7 +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:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index f8fa9de..6a75259 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,12 +1,7 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. - hacking>=3.0,<3.1.0 # Apache-2.0 coverage>=4.0,!=4.4 # Apache-2.0 ddt>=1.0.1 # MIT -python-subunit>=0.0.18 # Apache-2.0/BSD sphinx>=2.0.0,!=2.1.0 # BSD -testrepository>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT pre-commit>=2.6.0 # MIT +stestr>=2.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 23b387b..19f44e6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,23 +1,29 @@ [tox] minversion = 3.1.1 envlist = py37,pep8 -skipsdist = True +skipsdist = true # Automatic envs (pyXX) will only use the python version appropriate to that # env and ignore basepython inherited from [testenv] if we set # ignore_basepython_conflict. -ignore_basepython_conflict = True +ignore_basepython_conflict = true [testenv] basepython = python3 -usedevelop = True +usedevelop = true setenv = - VIRTUAL_ENV={envdir} - PYTHONWARNINGS=default::DeprecationWarning + LANGUAGE=en_US + LC_ALL=en_US.utf-8 + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=60 + PYTHONDONTWRITEBYTECODE=1 + PYTHONWARNINGS=default::DeprecationWarning deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt - -commands = python setup.py test --slowest --testr-args='{posargs}' +commands = + stestr run {posargs} + stestr slowest [testenv:pep8] commands = pre-commit run -a @@ -26,26 +32,34 @@ commands = pre-commit run -a commands = {posargs} [testenv:cover] -commands = python setup.py test --coverage --testr-args='{posargs}' +setenv = + {[testenv]setenv} + PYTHON=coverage run --source nova --parallel-mode +commands = + coverage erase + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:docs] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = - sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html + sphinx-build -a -E -W --keep-going -b html doc/source doc/build/html [testenv:releasenotes] deps = {[testenv:docs]deps} commands = - sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html + sphinx-build -a -E -W --keep-going -b html releasenotes/source releasenotes/build/html [testenv:debug] commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. - show-source = True ignore = E123,E125 builtins = _