diff --git a/.gitignore b/.gitignore index 95cdb085..d311e9b9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,8 @@ cover .testrepository *.sqlite .venv +.cache +pytest_results.html # Docs doc/source/_build/ diff --git a/test-requirements.txt b/test-requirements.txt index e7708fe5..4abcc03d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,12 +2,13 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking<0.10,>=0.9.2 +pytest>=2.7 +pytest-html coverage>=3.6 # Apache-2.0 ddt>=1.0.1 # MIT mock>=2.0 # BSD python-dateutil>=2.4.2 # BSD -testrepository>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index b7d88c3a..3c354ee7 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ install_command = pip install -U {opts} {packages} usedevelop = True commands = find . -type f -name "*.pyc" -delete - python setup.py testr --slowest --testr-args='{posargs}' + py.test --html=pytest_results.html --durations=10 "tests/unit" {posargs} distribute = false basepython = python2.7 passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY @@ -35,7 +35,6 @@ basepython = python3.4 [testenv:venv] commands = {posargs} - [testenv:debug] commands = oslo_debug_helper -t tests {posargs} @@ -45,7 +44,9 @@ commands = oslo_debug_helper -t tests {posargs} [testenv:cli] sitepackages = True -commands = {toxinidir}/tests/ci/rally-integrated.sh +commands = + find . -type f -name "*.pyc" -delete + py.test --html=pytest_results.html --durations=10 "tests/functional" {posargs} [testenv:cover]