diff --git a/.gitignore b/.gitignore index f261714..13f7471 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.egg-info .tox +.stestr build/* *.pyc gerritlib/versioninfo diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..43cfe0f --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,2 @@ +[DEFAULT] +test_path=./gerritlib/tests diff --git a/test-requirements.txt b/test-requirements.txt index ebbf260..905b329 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,5 @@ hacking>=0.5.6,<0.11 sphinx>=1.1.2,<1.2 python-subunit -testrepository +stestr<3.0.0;python_version<'3.5' +stestr;python_version>='3.5' diff --git a/tox.ini b/tox.ini index 0471f14..3faefb3 100644 --- a/tox.ini +++ b/tox.ini @@ -6,11 +6,12 @@ skip_missing_interpreters = false envlist = pep8, py{38,37,36,35,27,py} [testenv] -commands = python setup.py test --slowest --testr-args='{posargs}' setenv = VIRTUAL_ENV={envdir} usedevelop = True install_command = pip install {opts} {packages} deps = -r{toxinidir}/test-requirements.txt +commands = + stestr run --slowest {posargs} [testenv:pep8] commands = flake8