From 0cbc0cd524983dfe7ad9ce6add664f5ac6639abf Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 17 Sep 2020 15:49:32 +0100 Subject: [PATCH] Replace testr with pytest Using a single test run orchestrator makes it easier to maintain the project, especially as pytest is actively maintained. Change-Id: I5c843984bc0a1b9264e744373e6a3fd9d43e99cd --- test-requirements.txt | 5 ----- tox.ini | 9 ++++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 98970f51..cdcaeff4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,9 +1,4 @@ -coverage>=3.6 fixtures>=3.0.0 -python-subunit -testrepository>=0.0.17 -testscenarios>=0.4 -testtools>=0.9.36,!=1.2.0 mock>=1.0 # queries use pytest pytest diff --git a/tox.ini b/tox.ini index fecf66b6..85c3ed8b 100644 --- a/tox.ini +++ b/tox.ini @@ -14,11 +14,11 @@ setenv = PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs} tests.unit' +commands = pytest elastic_recheck/tests/unit [testenv:functional] basepython = python3 -commands = python setup.py testr --slowest --testr-args='{posargs} tests.functional' +commands = pytest elastic_recheck/tests/functional [testenv:queries] basepython = python3 @@ -31,7 +31,10 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = python setup.py test --coverage --coverage-package-name='elastic_recheck' --testr-args='{posargs} tests.unit' +deps = + {[testenv]deps} + pytest-cov +commands = pytest --cov=elastic_recheck {posargs} elastic_recheck/tests/unit [testenv:run] basepython = python3